Class MinMax

All Implemented Interfaces:
PostfixMathCommandI, Serializable

public class MinMax extends ArrayFunctionBase
Minimum and Maximum functions. Initialize with true for minimum and false for maximum. Since Jep 3.4 this function will flatten its arguments so min([1,[2,3]]) will be 1.
Since:
3.1.0
See Also:
  • Field Details

    • comp

      protected final Comparative comp
      Used to compare greater than or less than between objects.
  • Constructor Details

    • MinMax

      public MinMax(boolean isMin)
      Constructor.
      Parameters:
      isMin - set to true for Minimum, false for Maximum
    • MinMax

      public MinMax(Comparative comp)
      Constructor allowing for a different Comparative object. The Comparative.compare(Object, Object) method will be used to compare elements.
      Parameters:
      comp - a Comparative object or subclass implemented less than or greater than.
      Since:
      3.4.0
  • Method Details