Class SegmentResponseValueConstraint

java.lang.Object
org.drip.spline.params.SegmentResponseValueConstraint

public class SegmentResponseValueConstraint
extends java.lang.Object
SegmentResponseValueConstraint holds the following set of fields that characterize a single global linear constraint between the predictor and the response variables within a single segment, expressed linearly across the constituent nodes. Constraints are expressed as C = Sigma_j [W_j * y_j] = V where x_j - Predictor j y_j - Response j W_j - Weight at ordinate j V - Value of the Constraint SegmentResponseValueConstraint exports the following functionality:
  • Indicator specifying that the knot is to the left of the constraint ordinates
  • Indicator specifying that the knot is to the right of the constraint ordinates
  • Indicator specifying that the knot splits the constraint ordinates
  • Generate a SegmentResponseValueConstraint instance from the given predictor/response pair
  • SegmentResponseValueConstraint constructor
  • Retrieve the Array of Predictor Ordinates
  • Retrieve the Array of Response Weights at each Predictor Ordinate
  • Retrieve the Constraint Value
  • Display the Comment Annotated State
  • Convert the Segment Constraint onto Local Predictor Ordinates, the corresponding Response Basis Function, and the Shape Controller Realizations
  • Get the Position of the Predictor Knot relative to the Constraints

Module Product Core Module
Library Fixed Income Analytics
Project Basis Splines and Linear Compounders across a Broad Family of Spline Basis Functions
Package Spline Segment Construction Control Parameters

Author:
Lakshmi Krishnamurthy
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int LEFT_OF_CONSTRAINT
    Indicator specifying that the knot is to the left of the constraint ordinates
    static int RIGHT_OF_CONSTRAINT
    Indicator specifying that the knot is to the right of the constraint ordinates
    static int SPLITS_CONSTRAINT
    Indicator specifying that the knot splits the constraint ordinates
  • Constructor Summary

    Constructors
    Constructor Description
    SegmentResponseValueConstraint​(double[] predictorOrdinateArray, double[] responseValueWeightArray, double weightedResponseValueConstraint)
    SegmentResponseValueConstraint constructor
  • Method Summary

    Modifier and Type Method Description
    double constraintValue()
    Retrieve the Constraint Value
    void display​(java.lang.String comment)
    Display the Comment Annotated State
    static SegmentResponseValueConstraint FromPredictorResponsePair​(double predictorOrdinate, double responseValue)
    Generate a SegmentResponseValueConstraint instance from the given predictor/response pair.
    int knotPosition​(double predictorKnot)
    Get the Position of the Predictor Knot relative to the Constraints
    double[] predictorOrdinates()
    Retrieve the Array of Predictor Ordinates
    SegmentBasisFlexureConstraint responseIndexedBasisConstraint​(BasisEvaluator basisEvaluator, LatentStateInelastic latentStateInelastic)
    Convert the Segment Constraint onto Local Predictor Ordinates, the corresponding Response Basis Function, and the Shape Controller Realizations
    double[] responseWeights()
    Retrieve the Array of Response Weights at each Predictor Ordinate

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LEFT_OF_CONSTRAINT

      public static final int LEFT_OF_CONSTRAINT
      Indicator specifying that the knot is to the left of the constraint ordinates
      See Also:
      Constant Field Values
    • RIGHT_OF_CONSTRAINT

      public static final int RIGHT_OF_CONSTRAINT
      Indicator specifying that the knot is to the right of the constraint ordinates
      See Also:
      Constant Field Values
    • SPLITS_CONSTRAINT

      public static final int SPLITS_CONSTRAINT
      Indicator specifying that the knot splits the constraint ordinates
      See Also:
      Constant Field Values
  • Constructor Details

    • SegmentResponseValueConstraint

      public SegmentResponseValueConstraint​(double[] predictorOrdinateArray, double[] responseValueWeightArray, double weightedResponseValueConstraint) throws java.lang.Exception
      SegmentResponseValueConstraint constructor
      Parameters:
      predictorOrdinateArray - The Array of Global Predictor Ordinates
      responseValueWeightArray - The Array of the Weights to be applied to the Response at each Predictor Ordinate
      weightedResponseValueConstraint - The Value of the Weighted Response Value Constraint
      Throws:
      java.lang.Exception - Throws if the Inputs are Invalid
  • Method Details

    • FromPredictorResponsePair

      public static final SegmentResponseValueConstraint FromPredictorResponsePair​(double predictorOrdinate, double responseValue)
      Generate a SegmentResponseValueConstraint instance from the given predictor/response pair.
      Parameters:
      predictorOrdinate - The Predictor Ordinate
      responseValue - The Response Value
      Returns:
      The SegmentResponseValueConstraint instance
    • predictorOrdinates

      public double[] predictorOrdinates()
      Retrieve the Array of Predictor Ordinates
      Returns:
      The Array of Predictor Ordinates
    • responseWeights

      public double[] responseWeights()
      Retrieve the Array of Response Weights at each Predictor Ordinate
      Returns:
      The Array of Response Weights at each Predictor Ordinate
    • constraintValue

      public double constraintValue()
      Retrieve the Constraint Value
      Returns:
      The Constraint Value
    • display

      public void display​(java.lang.String comment)
      Display the Comment Annotated State
      Parameters:
      comment - Annotation Comment
    • responseIndexedBasisConstraint

      public SegmentBasisFlexureConstraint responseIndexedBasisConstraint​(BasisEvaluator basisEvaluator, LatentStateInelastic latentStateInelastic)
      Convert the Segment Constraint onto Local Predictor Ordinates, the corresponding Response Basis Function, and the Shape Controller Realizations
      Parameters:
      basisEvaluator - The Local Basis Evaluator
      latentStateInelastic - Inelastics transformer to convert coordinate space to Local from Global
      Returns:
      The Segment Basis Function Constraint
    • knotPosition

      public int knotPosition​(double predictorKnot) throws java.lang.Exception
      Get the Position of the Predictor Knot relative to the Constraints
      Parameters:
      predictorKnot - The Predictor Knot Ordinate
      Returns:
      Indicator specifying whether the Knot is Left of the constraints, Right of the Constraints, or splits the Constraints
      Throws:
      java.lang.Exception - Thrown if Inputs are invalid