Class ConstantTableFunction

java.lang.Object
com.amalgamasimulation.utils.tablefunction.ConstantTableFunction
All Implemented Interfaces:
ITableFunction, Serializable

public class ConstantTableFunction extends Object implements ITableFunction
ConstantTableFunction
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConstantTableFunction(double value)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    get(double arg)
    Returns value by the specified argument.
     
    double
    getAverageSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep)
     
     
    double
    getInterpolated(double arg)
     
    double
    Returns minimal argument with non-zero value.
    double
    getMaxNonZeroArgumentBetween(double beginArgument, double endArgument)
     
    double
    getMaxSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep)
     
    double
    Returns minimal argument with non-zero value.
    double
    getMinNonZeroArgumentBetween(double beginArgument, double endArgument)
     
    double
    getMinSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep)
     
    double
    getPeriod(double beginArgInclusive, double cumulativeValueLimit)
    Returns the argument such that the integral from the specified beginArgInclusive to this argument equals cumulativeValueLimit.
    double
    getSumBetween(double beginArgInclusive, double endArgExclusive)
    Returns square under the line of the plot between the specified values (definite integral of the function from beginArgInclusive to endArgExclusive).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • value

      protected double value
  • Constructor Details

    • ConstantTableFunction

      public ConstantTableFunction(double value)
  • Method Details

    • getSumBetween

      public double getSumBetween(double beginArgInclusive, double endArgExclusive)
      Description copied from interface: ITableFunction
      Returns square under the line of the plot between the specified values (definite integral of the function from beginArgInclusive to endArgExclusive).
      Specified by:
      getSumBetween in interface ITableFunction
      Parameters:
      beginArgInclusive - begin argument of the interval. NaNs and infinities are not allowed.
      endArgExclusive - end argument of the interval, should be greater than beginArgInclusive so that interval has non-zero length. NaNs and infinities are not allowed.
      Returns:
      Square under the line of the plot between the specified values.
    • getPeriod

      public double getPeriod(double beginArgInclusive, double cumulativeValueLimit)
      Description copied from interface: ITableFunction
      Returns the argument such that the integral from the specified beginArgInclusive to this argument equals cumulativeValueLimit.
      Specified by:
      getPeriod in interface ITableFunction
      Parameters:
      beginArgInclusive - begin argument of the interval. NaNs and infinities are not allowed.
      cumulativeValueLimit - cumulative values limit. NaNs and infinities are not allowed.
      Returns:
      The argument with cumulative value summ equal to cumulativeValueLimit.
    • get

      public double get(double arg)
      Description copied from interface: ITableFunction
      Returns value by the specified argument.
      Specified by:
      get in interface ITableFunction
      Parameters:
      arg - argument
      Returns:
      Value by argument
    • getInterpolated

      public double getInterpolated(double arg)
      Specified by:
      getInterpolated in interface ITableFunction
    • getMaxNonZeroArgument

      public double getMaxNonZeroArgument()
      Description copied from interface: ITableFunction
      Returns minimal argument with non-zero value.
      Specified by:
      getMaxNonZeroArgument in interface ITableFunction
      Returns:
      Minimal argument with non-zero value, or Double.NEGATIVE_INFINITY if there are no non-zero values in the table function
    • getMinNonZeroArgument

      public double getMinNonZeroArgument()
      Description copied from interface: ITableFunction
      Returns minimal argument with non-zero value.
      Specified by:
      getMinNonZeroArgument in interface ITableFunction
      Returns:
      Minimal argument with non-zero value, or Double.POSITIVE_INFINITY if there are no non-zero values in the table function
    • getMaxNonZeroArgumentBetween

      public double getMaxNonZeroArgumentBetween(double beginArgument, double endArgument)
      Specified by:
      getMaxNonZeroArgumentBetween in interface ITableFunction
    • getMinNonZeroArgumentBetween

      public double getMinNonZeroArgumentBetween(double beginArgument, double endArgument)
      Specified by:
      getMinNonZeroArgumentBetween in interface ITableFunction
    • getMaxSum

      public double getMaxSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep)
      Specified by:
      getMaxSum in interface ITableFunction
    • getAverageSum

      public double getAverageSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep)
      Specified by:
      getAverageSum in interface ITableFunction
    • getMinSum

      public double getMinSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep)
      Specified by:
      getMinSum in interface ITableFunction
    • getCopy

      public ITableFunction getCopy()
      Specified by:
      getCopy in interface ITableFunction
    • getArgumentValuePairs

      public List<Pair<Double,Double>> getArgumentValuePairs()
      Specified by:
      getArgumentValuePairs in interface ITableFunction