Class TorqueRollingMedian

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

public final class TorqueRollingMedian extends Object
Rolling median o(nlogn)
  • 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

      public static final void main(String[] args)