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.
|
evaluate
dimensionOfDomain, dimensionOfRange
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dimensionOfDomain, dimensionOfRange
public 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()
OrderedPairs
x
in interface OrderedPairs
public double[] y()
OrderedPairs
y
in interface OrderedPairs
public double minDomain()
public double maxDomain()
public int size()
OrderedPairs
size
in interface OrderedPairs
public double evaluate(double x)
UnivariateRealFunction
evaluate
in interface UnivariateRealFunction
x
- xCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.