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 intnumBasis()Retrieve the number of Segment's Basis FunctionsBasisEvaluatorreplicate()Clone/Replicate the current Basis Evaluator InstancedoubleresponseValue(double[] responseBasisCoefficientArray, double predictorOrdinate)Compute the Response Value at the specified Predictor OrdinatedoubleresponseValueDerivative(double[] responseBasisCoefficientArray, double predictorOrdinate, int order)Compute the Response Value Derivative at the specified Predictor OrdinatebooleansetContainingInelastics(LatentStateInelastic latentStateInelastic)Set the Inelastics that provides the enveloping Context the Basis EvaluationdoubleshapedBasisFunctionDerivative(double predictorOrdinate, int order, int basisFunctionIndex)Compute the Ordered Derivative of the Response Value off of the indexed Basis Function at the specified Predictor OrdinatedoubleshapedBasisFunctionResponse(double predictorOrdinate, int basisFunctionIndex)Compute the Response Value of the indexed Basis Function at the specified Predictor OrdinatedoubleunshapedBasisFunctionDerivative(double[] responseBasisCoefficientArray, double predictorOrdinate, int order)Compute the Ordered Derivative of the Response Value off of the Basis Function Set at the specified Predictor OrdinatedoubleunshapedResponseValue(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:BasisEvaluatorRetrieve the number of Segment's Basis Functions- Specified by:
numBasisin interfaceBasisEvaluator- Returns:
- The Number of Segment's Basis Functions
-
setContainingInelastics
Description copied from interface:BasisEvaluatorSet the Inelastics that provides the enveloping Context the Basis Evaluation- Specified by:
setContainingInelasticsin interfaceBasisEvaluator- Parameters:
latentStateInelastic- The Inelastic Settings- Returns:
- TRUE - The inelastics has been set
-
replicate
Description copied from interface:BasisEvaluatorClone/Replicate the current Basis Evaluator Instance- Specified by:
replicatein interfaceBasisEvaluator- Returns:
- TRUE - The Replicated Basis Evaluator Instance
-
shapedBasisFunctionResponse
public double shapedBasisFunctionResponse(double predictorOrdinate, int basisFunctionIndex) throws java.lang.ExceptionDescription copied from interface:BasisEvaluatorCompute the Response Value of the indexed Basis Function at the specified Predictor Ordinate- Specified by:
shapedBasisFunctionResponsein 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:BasisEvaluatorCompute the Basis Function Value at the specified Predictor Ordinate- Specified by:
unshapedResponseValuein 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:BasisEvaluatorCompute the Response Value at the specified Predictor Ordinate- Specified by:
responseValuein 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:BasisEvaluatorCompute the Ordered Derivative of the Response Value off of the indexed Basis Function at the specified Predictor Ordinate- Specified by:
shapedBasisFunctionDerivativein 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:BasisEvaluatorCompute the Ordered Derivative of the Response Value off of the Basis Function Set at the specified Predictor Ordinate- Specified by:
unshapedBasisFunctionDerivativein 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:BasisEvaluatorCompute the Response Value Derivative at the specified Predictor Ordinate- Specified by:
responseValueDerivativein 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
-