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 Functions
    BasisEvaluator replicate()
    Clone/Replicate the current Basis Evaluator Instance
    double responseValue​(double[] responseBasisCoefficientArray, double predictorOrdinate)
    Compute the Response Value at the specified Predictor Ordinate
    double responseValueDerivative​(double[] responseBasisCoefficientArray, double predictorOrdinate, int order)
    Compute the Response Value Derivative at the specified Predictor Ordinate
    boolean setContainingInelastics​(LatentStateInelastic latentStateInelastic)
    Set the Inelastics that provides the enveloping Context the Basis Evaluation
    double 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 Ordinate
    double shapedBasisFunctionResponse​(double predictorOrdinate, int basisFunctionIndex)
    Compute the Response Value of the indexed Basis Function at the specified Predictor Ordinate
    double 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 Ordinate
    double unshapedResponseValue​(double[] responseBasisCoefficientArray, double predictorOrdinate)
    Compute the Basis Function Value at the specified Predictor Ordinate

    Methods 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.Exception
      SegmentBasisEvaluator constructor
      Parameters:
      functionSet - The Function Set Instance the contains the Basis Function Set
      responseScalingShapeControl - 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 interface BasisEvaluator
      Returns:
      The Number of Segment's Basis Functions
    • setContainingInelastics

      public boolean setContainingInelastics​(LatentStateInelastic latentStateInelastic)
      Description copied from interface: BasisEvaluator
      Set the Inelastics that provides the enveloping Context the Basis Evaluation
      Specified by:
      setContainingInelastics in interface BasisEvaluator
      Parameters:
      latentStateInelastic - The Inelastic Settings
      Returns:
      TRUE - The inelastics has been set
    • replicate

      public BasisEvaluator replicate()
      Description copied from interface: BasisEvaluator
      Clone/Replicate the current Basis Evaluator Instance
      Specified by:
      replicate in interface BasisEvaluator
      Returns:
      TRUE - The Replicated Basis Evaluator Instance
    • shapedBasisFunctionResponse

      public double shapedBasisFunctionResponse​(double predictorOrdinate, int basisFunctionIndex) throws java.lang.Exception
      Description copied from interface: BasisEvaluator
      Compute the Response Value of the indexed Basis Function at the specified Predictor Ordinate
      Specified by:
      shapedBasisFunctionResponse in interface BasisEvaluator
      Parameters:
      predictorOrdinate - The specified Predictor Ordinate
      basisFunctionIndex - 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.Exception
      Description copied from interface: BasisEvaluator
      Compute the Basis Function Value at the specified Predictor Ordinate
      Specified by:
      unshapedResponseValue in interface BasisEvaluator
      Parameters:
      responseBasisCoefficientArray - Array of the Response Basis Coefficients
      predictorOrdinate - 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.Exception
      Description copied from interface: BasisEvaluator
      Compute the Response Value at the specified Predictor Ordinate
      Specified by:
      responseValue in interface BasisEvaluator
      Parameters:
      responseBasisCoefficientArray - Array of the Response Basis Coefficients
      predictorOrdinate - 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.Exception
      Description 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 interface BasisEvaluator
      Parameters:
      predictorOrdinate - The specified Predictor Ordinate
      order - Order of the Derivative
      basisFunctionIndex - 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.Exception
      Description 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 interface BasisEvaluator
      Parameters:
      responseBasisCoefficientArray - Array of the Response Basis Coefficients
      predictorOrdinate - The specified Predictor Ordinate
      order - 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.Exception
      Description copied from interface: BasisEvaluator
      Compute the Response Value Derivative at the specified Predictor Ordinate
      Specified by:
      responseValueDerivative in interface BasisEvaluator
      Parameters:
      responseBasisCoefficientArray - Array of the Response Basis Coefficients
      predictorOrdinate - The specified Predictor Ordinate
      order - Order of the Derivative
      Returns:
      The Response Value Derivative
      Throws:
      java.lang.Exception - Thrown if the Response Value Derivative cannot be computed