org.jquantlib.math.interpolations
Class AbstractInterpolation
- java.lang.Object
-
- org.jquantlib.math.interpolations.AbstractInterpolation
-
- All Implemented Interfaces:
- Extrapolator, Interpolation, Ops.DoubleOp
- Direct Known Subclasses:
- BackwardFlatInterpolation, CubicInterpolation, ForwardFlatInterpolation, LinearInterpolation, LogCubicInterpolation, LogLinearInterpolation, SABRInterpolation
public abstract class AbstractInterpolation extends java.lang.Object implements Interpolation
Abstract base class for 1-D interpolations.Classes derived from this class will provide interpolated values from two sequences of equal length, representing discretized values of a variable and a function of the former, respectively.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jquantlib.math.interpolations.Interpolation
Interpolation.Interpolator
-
-
Constructor Summary
Constructors Constructor and Description AbstractInterpolation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanallowsExtrapolation()tells whether extrapolation is enableddoublederivative(double x)doublederivative(double x, boolean allowExtrapolation)voiddisableExtrapolation()disable extrapolation in subsequent callsbooleanempty()voidenableExtrapolation()enable extrapolation in subsequent callsbooleanisInRange(double x)doubleop(double x)doubleop(double x, boolean allowExtrapolation)doubleprimitive(double x)doubleprimitive(double x, boolean allowExtrapolation)doublesecondDerivative(double x)doublesecondDerivative(double x, boolean allowExtrapolation)voidupdate()doublexMax()doublexMin()
-
-
-
Method Detail
-
empty
public boolean empty()
- Specified by:
emptyin interfaceInterpolation
-
op
public double op(double x)
- Specified by:
opin interfaceInterpolation- Specified by:
opin interfaceOps.DoubleOp
-
op
public double op(double x, boolean allowExtrapolation)- Specified by:
opin interfaceInterpolation
-
primitive
public double primitive(double x)
- Specified by:
primitivein interfaceInterpolation
-
primitive
public double primitive(double x, boolean allowExtrapolation)- Specified by:
primitivein interfaceInterpolation
-
derivative
public double derivative(double x)
- Specified by:
derivativein interfaceInterpolation
-
derivative
public double derivative(double x, boolean allowExtrapolation)- Specified by:
derivativein interfaceInterpolation
-
secondDerivative
public double secondDerivative(double x)
- Specified by:
secondDerivativein interfaceInterpolation
-
secondDerivative
public double secondDerivative(double x, boolean allowExtrapolation)- Specified by:
secondDerivativein interfaceInterpolation
-
xMin
public double xMin()
- Specified by:
xMinin interfaceInterpolation
-
xMax
public double xMax()
- Specified by:
xMaxin interfaceInterpolation
-
isInRange
public boolean isInRange(double x)
- Specified by:
isInRangein interfaceInterpolation
-
update
public void update()
- Specified by:
updatein interfaceInterpolation
-
allowsExtrapolation
public final boolean allowsExtrapolation()
Description copied from interface:Extrapolatortells whether extrapolation is enabled- Specified by:
allowsExtrapolationin interfaceExtrapolator
-
disableExtrapolation
public void disableExtrapolation()
Description copied from interface:Extrapolatordisable extrapolation in subsequent calls- Specified by:
disableExtrapolationin interfaceExtrapolator
-
enableExtrapolation
public void enableExtrapolation()
Description copied from interface:Extrapolatorenable extrapolation in subsequent calls- Specified by:
enableExtrapolationin interfaceExtrapolator
-
-
DataMelt 3.0 © DataMelt by jWork.ORG