Class TorqueRollingMedian
java.lang.Object
org.texastorque.torquelib.control.TorqueRollingMedian
Rolling median
o(nlogn)
-
Constructor Summary
ConstructorDescriptionTorqueRollingMedian
(int window) Constructs a new rolling median class, specifying the window size. -
Method Summary
-
Constructor Details
-
TorqueRollingMedian
public TorqueRollingMedian(int window) Constructs a new rolling median class, specifying the window size.- Parameters:
window
- The window size for each section (twice is the amount stored).
-
-
Method Details
-
calculate
public final double calculate(double value) Adds and performs calculation- Parameters:
value
- The value to add.- Returns:
- The median value.
-
main
-