Class LinearInterpolator
java.lang.Object
dev.nm.analysis.function.rn2r1.AbstractRealScalarFunction
dev.nm.analysis.function.rn2r1.univariate.AbstractUnivariateRealFunction
dev.nm.analysis.curvefit.interpolation.LinearInterpolator
- All Implemented Interfaces:
OnlineInterpolator
,Function<Vector,
,Double> RealScalarFunction
,UnivariateRealFunction
public class LinearInterpolator
extends AbstractUnivariateRealFunction
implements OnlineInterpolator
Define a univariate function by linearly interpolating between adjacent points.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a univariate function by linearly interpolating between adjacent points. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add more points for interpolation.double
evaluate
(double u) Evaluate y = f(x).Methods inherited from class dev.nm.analysis.function.rn2r1.univariate.AbstractUnivariateRealFunction
evaluate
Methods inherited from class dev.nm.analysis.function.rn2r1.AbstractRealScalarFunction
dimensionOfDomain, dimensionOfRange
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.nm.analysis.function.Function
dimensionOfDomain, dimensionOfRange
-
Constructor Details
-
LinearInterpolator
Construct a univariate function by linearly interpolating between adjacent points.- Parameters:
f
- the points to be interpolated
-
-
Method Details
-
addData
Description copied from interface:OnlineInterpolator
Add more points for interpolation.- Specified by:
addData
in interfaceOnlineInterpolator
- Parameters:
f
- the points to be interpolated
-
evaluate
public double evaluate(double u) Description copied from interface:UnivariateRealFunction
Evaluate y = f(x).- Specified by:
evaluate
in interfaceUnivariateRealFunction
- Parameters:
u
- x- Returns:
- f(x)
-