public class Span extends AbstractUnivariate
Modifier and Type | Class and Description |
---|---|
class |
Span.InterpolatorTargetEvalParams |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BASIS_SPLINE_BERNSTEIN_POLYNOMIAL
Bernstein Polynomial Spline
|
static java.lang.String |
BASIS_SPLINE_EXPONENTIAL_TENSION
Exponential Tension Spline
|
static java.lang.String |
BASIS_SPLINE_HYPERBOLIC_TENSION
Hyperbolic Tension Spline
|
static java.lang.String |
BASIS_SPLINE_KAKLIS_PANDELIS
Kaklis Pandelis Spline
|
static java.lang.String |
BASIS_SPLINE_POLYNOMIAL
Polynomial Spline
|
static int |
CALIBRATE_JACOBIAN
Span Set Up Mode: Calibrate Jacobian
|
static int |
CALIBRATE_SPAN
Span Set Up Mode: Calibrate SPAN
|
static int |
SET_ITEP
Span Set Up Mode: Set Up ITEP
|
static java.lang.String |
SPLINE_BOUNDARY_MODE_FINANCIAL
Calibration Mode: Financial Boundary Condition
|
static java.lang.String |
SPLINE_BOUNDARY_MODE_NATURAL
Calibration Mode: Natural Boundary Condition
|
Constructor and Description |
---|
Span(double[] adblX,
SegmentControlParams segControlParams)
Span constructor - Constructs a sequence of basis spline segments
|
Modifier and Type | Method and Description |
---|---|
double |
calcTailDerivative(int iOrder)
Calculate the tail derivative of the requested order for the given node
|
double |
calcValue(double dblX)
Calculates the interpolated value at the given input point
|
WengertJacobian |
calcValueJacobian(double dblX)
Calculates the Jacobian to the inputs at the given input point
|
static Span |
CreateCalibratedSpanInterpolator(double[] adblX,
double[] adblY,
java.lang.String strCalibrationMode,
SegmentControlParams segControlParams,
int iSetupMode)
Creates a calibrated Span instance over the specified X and Y input array points, using the specified
basis splines.
|
static Span |
CreateCalibratedSpanInterpolator(double[] adblX,
double dblY,
java.lang.String strCalibrationMode,
SegmentControlParams segControlParams,
int iSetupMode)
Creates a Calibrated Span instance from an array of X points and a flat Y point
|
java.lang.String |
displayDerivatives()
Displays the full span segment begin and end derivatives
|
double |
evaluate(double dblLeftSlope)
Evaluate for the given variate
|
Span |
insertKnot(double dblX,
double dblY)
Insert a Knot
|
boolean |
isCoMonotone(double[] adblY)
Verify whether the segment and spline mini-max behavior matches
|
boolean |
isKnot(double dblX)
Is the given X a knot location
|
boolean |
isLocallyMonotone()
Indicates if all the comprising segments are monotone
|
SegmentMonotonocity |
monotoneType(double dblX)
Identifies the monotone type for the segment underlying the given input point
|
boolean |
resetNode(int iNodeIndex,
double dblNodeValue)
Reset the given node with the given value
|
boolean |
setLeftNode(double dblLeftValue,
double dblLeftSlope,
double dblRightValue)
Sets the left slope
|
calcDerivative, calcDifferential, calcDifferential
public static final java.lang.String BASIS_SPLINE_POLYNOMIAL
public static final java.lang.String BASIS_SPLINE_BERNSTEIN_POLYNOMIAL
public static final java.lang.String BASIS_SPLINE_HYPERBOLIC_TENSION
public static final java.lang.String BASIS_SPLINE_EXPONENTIAL_TENSION
public static final java.lang.String BASIS_SPLINE_KAKLIS_PANDELIS
public static final java.lang.String SPLINE_BOUNDARY_MODE_NATURAL
public static final java.lang.String SPLINE_BOUNDARY_MODE_FINANCIAL
public static final int SET_ITEP
public static final int CALIBRATE_SPAN
public static final int CALIBRATE_JACOBIAN
public Span(double[] adblX, SegmentControlParams segControlParams) throws java.lang.Exception
adblX
- Array of segment end pointssegControlParams
- Segment Control Parametersjava.lang.Exception
- Thrown if the inputs are invalidpublic static final Span CreateCalibratedSpanInterpolator(double[] adblX, double[] adblY, java.lang.String strCalibrationMode, SegmentControlParams segControlParams, int iSetupMode)
adblX
- Input X array pointsadblY
- Input Y array pointsstrCalibrationMode
- Calibration ModesegControlParams
- Segment Control ParametersiSetupMode
- Setup Modepublic static final Span CreateCalibratedSpanInterpolator(double[] adblX, double dblY, java.lang.String strCalibrationMode, SegmentControlParams segControlParams, int iSetupMode)
adblX
- X ArraydblY
- Flat Y InputstrCalibrationMode
- Calibration ModesegControlParams
- Segment Control ParametersiSetupMode
- Setup Modepublic double evaluate(double dblLeftSlope) throws java.lang.Exception
AbstractUnivariate
evaluate
in class AbstractUnivariate
dblLeftSlope
- Variatejava.lang.Exception
- Thrown if evaluation cannot be donepublic boolean setLeftNode(double dblLeftValue, double dblLeftSlope, double dblRightValue)
dblLeftValue
- Left most node valuedblLeftSlope
- Left most node slopedblRightValue
- Left most node valuepublic double calcValue(double dblX) throws java.lang.Exception
dblX
- Input pointjava.lang.Exception
- Thrown if the interpolation did not succeedpublic WengertJacobian calcValueJacobian(double dblX)
dblX
- Input pointpublic SegmentMonotonocity monotoneType(double dblX)
dblX
- Input pointpublic boolean isLocallyMonotone() throws java.lang.Exception
java.lang.Exception
- Thrown if the Segment monotone Type could not be estimatedpublic boolean isCoMonotone(double[] adblY) throws java.lang.Exception
adblY
- Input Y array pointsjava.lang.Exception
- Thrown if the Segment monotone Type could not be estimatedpublic boolean isKnot(double dblX)
dblX
- Knot Xpublic Span insertKnot(double dblX, double dblY)
dblX
- Knot XdblY
- Knot Ypublic double calcTailDerivative(int iOrder) throws java.lang.Exception
iOrder
- Order of the derivativejava.lang.Exception
- Thrown if the derivative cannot be calculatedpublic boolean resetNode(int iNodeIndex, double dblNodeValue)
iNodeIndex
- Node whose value is setdblNodeValue
- Node Valuepublic java.lang.String displayDerivatives()