Class TorquePersistentBoolean
java.lang.Object
org.texastorque.torquelib.control.TorquePersistentBoolean
Rolling median
o(nlogn)
-
Constructor Summary
ConstructorDescriptionTorquePersistentBoolean
(int window) Constructs a new rolling median class, specifying the window size. -
Method Summary
-
Constructor Details
-
TorquePersistentBoolean
public TorquePersistentBoolean(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
-
add
public final void add(boolean value) Adds a value.- Parameters:
value
- The value to add.
-
any
public final boolean any() -
any
public final boolean any(boolean value) -
all
public final boolean all() -
all
public final boolean all(boolean value) -
portion
public final double portion() -
portion
public final double portion(boolean value) Calculates the % of window that is "value".
-