Package org.drip.spline.segment
Class SegmentBasisEvaluator
java.lang.Object
org.drip.spline.segment.SegmentBasisEvaluator
- All Implemented Interfaces:
BasisEvaluator
public class SegmentBasisEvaluator extends java.lang.Object implements BasisEvaluator
SegmentBasisEvaluator implements the BasisEvaluator interface for the given set of the Segment
Basis Evaluator Functions.
Module | Product Core Module |
Library | Fixed Income Analytics |
Project | Basis Splines and Linear Compounders across a Broad Family of Spline Basis Functions |
Package | Flexure Penalizing Best Fit Segment |
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description SegmentBasisEvaluator(FunctionSet functionSet, ResponseScalingShapeControl responseScalingShapeControl)
SegmentBasisEvaluator constructor -
Method Summary
Modifier and Type Method Description int
numBasis()
Retrieve the number of Segment's Basis FunctionsBasisEvaluator
replicate()
Clone/Replicate the current Basis Evaluator Instancedouble
responseValue(double[] responseBasisCoefficientArray, double predictorOrdinate)
Compute the Response Value at the specified Predictor Ordinatedouble
responseValueDerivative(double[] responseBasisCoefficientArray, double predictorOrdinate, int order)
Compute the Response Value Derivative at the specified Predictor Ordinateboolean
setContainingInelastics(LatentStateInelastic latentStateInelastic)
Set the Inelastics that provides the enveloping Context the Basis Evaluationdouble
shapedBasisFunctionDerivative(double predictorOrdinate, int order, int basisFunctionIndex)
Compute the Ordered Derivative of the Response Value off of the indexed Basis Function at the specified Predictor Ordinatedouble
shapedBasisFunctionResponse(double predictorOrdinate, int basisFunctionIndex)
Compute the Response Value of the indexed Basis Function at the specified Predictor Ordinatedouble
unshapedBasisFunctionDerivative(double[] responseBasisCoefficientArray, double predictorOrdinate, int order)
Compute the Ordered Derivative of the Response Value off of the Basis Function Set at the specified Predictor Ordinatedouble
unshapedResponseValue(double[] responseBasisCoefficientArray, double predictorOrdinate)
Compute the Basis Function Value at the specified Predictor OrdinateMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SegmentBasisEvaluator
public SegmentBasisEvaluator(FunctionSet functionSet, ResponseScalingShapeControl responseScalingShapeControl) throws java.lang.ExceptionSegmentBasisEvaluator constructor- Parameters:
functionSet
- The Function Set Instance the contains the Basis Function SetresponseScalingShapeControl
- The Segment Wide Shape Controller- Throws:
java.lang.Exception
- Thrown if the Inputs are invalid
-
-
Method Details
-
numBasis
public int numBasis()Description copied from interface:BasisEvaluator
Retrieve the number of Segment's Basis Functions- Specified by:
numBasis
in interfaceBasisEvaluator
- Returns:
- The Number of Segment's Basis Functions
-
setContainingInelastics
Description copied from interface:BasisEvaluator
Set the Inelastics that provides the enveloping Context the Basis Evaluation- Specified by:
setContainingInelastics
in interfaceBasisEvaluator
- Parameters:
latentStateInelastic
- The Inelastic Settings- Returns:
- TRUE - The inelastics has been set
-
replicate
Description copied from interface:BasisEvaluator
Clone/Replicate the current Basis Evaluator Instance- Specified by:
replicate
in interfaceBasisEvaluator
- Returns:
- TRUE - The Replicated Basis Evaluator Instance
-
shapedBasisFunctionResponse
public double shapedBasisFunctionResponse(double predictorOrdinate, int basisFunctionIndex) throws java.lang.ExceptionDescription copied from interface:BasisEvaluator
Compute the Response Value of the indexed Basis Function at the specified Predictor Ordinate- Specified by:
shapedBasisFunctionResponse
in interfaceBasisEvaluator
- Parameters:
predictorOrdinate
- The specified Predictor OrdinatebasisFunctionIndex
- Index representing the Basis Function in the Basis Function Set- Returns:
- The Response Value of the indexed Basis Function at the specified Predictor Ordinate
- Throws:
java.lang.Exception
- Thrown if the Ordered Derivative cannot be computed
-
unshapedResponseValue
public double unshapedResponseValue(double[] responseBasisCoefficientArray, double predictorOrdinate) throws java.lang.ExceptionDescription copied from interface:BasisEvaluator
Compute the Basis Function Value at the specified Predictor Ordinate- Specified by:
unshapedResponseValue
in interfaceBasisEvaluator
- Parameters:
responseBasisCoefficientArray
- Array of the Response Basis CoefficientspredictorOrdinate
- The specified Predictor Ordinate- Returns:
- The Basis Function Value
- Throws:
java.lang.Exception
- Thrown if the Basis Function Value cannot be computed
-
responseValue
public double responseValue(double[] responseBasisCoefficientArray, double predictorOrdinate) throws java.lang.ExceptionDescription copied from interface:BasisEvaluator
Compute the Response Value at the specified Predictor Ordinate- Specified by:
responseValue
in interfaceBasisEvaluator
- Parameters:
responseBasisCoefficientArray
- Array of the Response Basis CoefficientspredictorOrdinate
- The specified Predictor Ordinate- Returns:
- The Response Value
- Throws:
java.lang.Exception
- Thrown if the Basis Function Value cannot be computed
-
shapedBasisFunctionDerivative
public double shapedBasisFunctionDerivative(double predictorOrdinate, int order, int basisFunctionIndex) throws java.lang.ExceptionDescription copied from interface:BasisEvaluator
Compute the Ordered Derivative of the Response Value off of the indexed Basis Function at the specified Predictor Ordinate- Specified by:
shapedBasisFunctionDerivative
in interfaceBasisEvaluator
- Parameters:
predictorOrdinate
- The specified Predictor Ordinateorder
- Order of the DerivativebasisFunctionIndex
- Index representing the Basis Function in the Basis Function Set- Returns:
- The Ordered Derivative of the Response Value off of the Indexed Basis Function
- Throws:
java.lang.Exception
- Thrown if the Ordered Derivative cannot be computed
-
unshapedBasisFunctionDerivative
public double unshapedBasisFunctionDerivative(double[] responseBasisCoefficientArray, double predictorOrdinate, int order) throws java.lang.ExceptionDescription copied from interface:BasisEvaluator
Compute the Ordered Derivative of the Response Value off of the Basis Function Set at the specified Predictor Ordinate- Specified by:
unshapedBasisFunctionDerivative
in interfaceBasisEvaluator
- Parameters:
responseBasisCoefficientArray
- Array of the Response Basis CoefficientspredictorOrdinate
- The specified Predictor Ordinateorder
- Order of the Derivative- Returns:
- The Ordered Derivative of the Response Value off of the Basis Function Set
- Throws:
java.lang.Exception
- Thrown if the Ordered Derivative of the Basis Function Set cannot be computed
-
responseValueDerivative
public double responseValueDerivative(double[] responseBasisCoefficientArray, double predictorOrdinate, int order) throws java.lang.ExceptionDescription copied from interface:BasisEvaluator
Compute the Response Value Derivative at the specified Predictor Ordinate- Specified by:
responseValueDerivative
in interfaceBasisEvaluator
- Parameters:
responseBasisCoefficientArray
- Array of the Response Basis CoefficientspredictorOrdinate
- The specified Predictor Ordinateorder
- Order of the Derivative- Returns:
- The Response Value Derivative
- Throws:
java.lang.Exception
- Thrown if the Response Value Derivative cannot be computed
-