Class ConstantTableFunction
java.lang.Object
com.amalgamasimulation.utils.tablefunction.ConstantTableFunction
- All Implemented Interfaces:
ITableFunction
,Serializable
ConstantTableFunction
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
get
(double arg) Returns value by the specified argument.double
getAverageSum
(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep) getCopy()
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 specifiedbeginArgInclusive
to this argument equalscumulativeValueLimit
.double
getSumBetween
(double beginArgInclusive, double endArgExclusive) Returns square under the line of the plot between the specified values (definite integral of the function frombeginArgInclusive
toendArgExclusive
).
-
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 frombeginArgInclusive
toendArgExclusive
).- Specified by:
getSumBetween
in interfaceITableFunction
- Parameters:
beginArgInclusive
- begin argument of the interval. NaNs and infinities are not allowed.endArgExclusive
- end argument of the interval, should be greater thanbeginArgInclusive
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 specifiedbeginArgInclusive
to this argument equalscumulativeValueLimit
.- Specified by:
getPeriod
in interfaceITableFunction
- 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 interfaceITableFunction
- Parameters:
arg
- argument- Returns:
- Value by argument
-
getInterpolated
public double getInterpolated(double arg) - Specified by:
getInterpolated
in interfaceITableFunction
-
getMaxNonZeroArgument
public double getMaxNonZeroArgument()Description copied from interface:ITableFunction
Returns minimal argument with non-zero value.- Specified by:
getMaxNonZeroArgument
in interfaceITableFunction
- 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 interfaceITableFunction
- 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 interfaceITableFunction
-
getMinNonZeroArgumentBetween
public double getMinNonZeroArgumentBetween(double beginArgument, double endArgument) - Specified by:
getMinNonZeroArgumentBetween
in interfaceITableFunction
-
getMaxSum
public double getMaxSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep) - Specified by:
getMaxSum
in interfaceITableFunction
-
getAverageSum
public double getAverageSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep) - Specified by:
getAverageSum
in interfaceITableFunction
-
getMinSum
public double getMinSum(double beginArgInclusive, double endArgExclusive, double argWindow, double argStep) - Specified by:
getMinSum
in interfaceITableFunction
-
getCopy
- Specified by:
getCopy
in interfaceITableFunction
-
getArgumentValuePairs
- Specified by:
getArgumentValuePairs
in interfaceITableFunction
-