public class StepFunction extends AbstractUnivariateRealFunction implements OrderedPairs
Function.EvaluationException| Constructor and Description |
|---|
StepFunction(double epsilon)
Construct an empty step function.
|
StepFunction(OrderedPairs f)
Construct a step function from a collection ordered pairs.
|
StepFunction(OrderedPairs f,
double epsilon)
Construct a step function from a collection ordered pairs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(OrderedPairs f)
Dynamically add points to the step function.
|
double |
evaluate(double x)
Evaluate y = f(x).
|
double |
maxDomain()
Get the biggest abscissae.
|
double |
minDomain()
Get the smallest abscissae.
|
int |
size()
Get the number of points.
|
double[] |
x()
Get the abscissae.
|
double[] |
y()
Get the ordinates.
|
evaluatedimensionOfDomain, dimensionOfRangeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdimensionOfDomain, dimensionOfRangepublic StepFunction(double epsilon)
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0public StepFunction(OrderedPairs f, double epsilon)
f - a collection of ordered pairsepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0public StepFunction(OrderedPairs f)
f - a collection of ordered pairspublic void add(OrderedPairs f)
f - a collection of ordered pairspublic double[] x()
OrderedPairsx in interface OrderedPairspublic double[] y()
OrderedPairsy in interface OrderedPairspublic double minDomain()
public double maxDomain()
public int size()
OrderedPairssize in interface OrderedPairspublic double evaluate(double x)
UnivariateRealFunctionevaluate in interface UnivariateRealFunctionx - xCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.