Class TorquePersistentBoolean

java.lang.Object
org.texastorque.torquelib.control.TorquePersistentBoolean

public final class TorquePersistentBoolean extends Object
Rolling median o(nlogn)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new rolling median class, specifying the window size.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    add(boolean value)
    Adds a value.
    final boolean
    all()
     
    final boolean
    all(boolean value)
     
    final boolean
    any()
     
    final boolean
    any(boolean value)
     
    final double
     
    final double
    portion(boolean value)
    Calculates the % of window that is "value".

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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".