public final class DiscreteFunction<X,Y> extends Function<X,Y>
This class represents a function defined from a mapping betweem two sets (points and values).
Instance of this class can be used to approximate continuous functions or to numerically solve differential systems.
| Constructor and Description |
|---|
DiscreteFunction(SortedMap<X,Y> pointValues,
Interpolator<X,Y> interpolator,
Variable<X> variable)
Creates the discrete function for the specified point-value entries.
|
| Modifier and Type | Method and Description |
|---|---|
Y |
evaluate()
Evaluates this function using its
variables current
values. |
Interpolator<X,Y> |
getInterpolator()
Returns the interpolator used by this discrete function.
|
SortedMap<X,Y> |
getPointValues()
Returns the point-value entries of this discrete function.
|
List<Variable<X>> |
getVariables()
Returns a lexically ordered list of the variables (or arguments)
for this function (empty list for constant functions).
|
javolution.text.Text |
toText()
Returns the textual representation of this real-time object
(equivalent to
toString except that the returned value
can be allocated from the local context space). |
public DiscreteFunction(SortedMap<X,Y> pointValues, Interpolator<X,Y> interpolator, Variable<X> variable)
pointValues - the point-value entries of this function.interpolator - the interpolator.variable - this function variable.public SortedMap<X,Y> getPointValues()
public Interpolator<X,Y> getInterpolator()
public Y evaluate()
Functionvariables current
values.public List<Variable<X>> getVariables()
FunctiongetVariables in class Function<X,Y>public javolution.text.Text toText()
FunctiontoString except that the returned value
can be allocated from the local context space).