Package org.drip.spline.grid
Class OverlappingStretchSpan
java.lang.Object
org.drip.spline.grid.OverlappingStretchSpan
- All Implemented Interfaces:
Span
public class OverlappingStretchSpan extends java.lang.Object implements Span
OverlappingStretchSpan implements the Span interface, and the collection functionality of
overlapping Stretches. In addition to providing a custom implementation of all the Span interface stubs,
it also converts the Overlapping Stretch Span to a non-overlapping Stretch Span. Overlapping Stretches
are clipped from the Left.
- OverlappingStretchSpan constructor
- Convert the Overlapping Stretch Span to a non-overlapping Stretch Span. Overlapping Stretches are clipped from the Left
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description OverlappingStretchSpan(MultiSegmentSequence multiSegmentSequence)
OverlappingStretchSpan constructor -
Method Summary
Modifier and Type Method Description boolean
addStretch(MultiSegmentSequence multiSegmentSequence)
Add a Stretch to the Spandouble
calcResponseValue(double predictorOrdinate)
Compute the Response from the containing Stretchesdouble
calcResponseValueDerivative(double predictorOrdinate, int order)
Compute the Response Value Derivative from the containing Stretchesjava.lang.String
displayString()
Display the Span Edge CoordinatesMultiSegmentSequence
getContainingStretch(double predictorOrdinate)
Retrieve the first Stretch that contains the Predictor OrdinateMultiSegmentSequence
getStretch(java.lang.String name)
Retrieve the Stretch by Nameboolean
in(double predictorOrdinate)
Check if the Predictor Ordinate is in the Stretch Rangeboolean
isMergeState(double predictorOrdinate, LatentStateLabel latentStateLabel)
Indicate if the specified Label is part of the Merge State at the specified Predictor OrdinateWengertJacobian
jackDResponseDManifestMeasure(java.lang.String manifestMeasure, double predictorOrdinate, int order)
Calculate the Response Derivative to the Manifest Measure at the specified Ordinatedouble
left()
Retrieve the Left Span Edgedouble
right()
Retrieve the Right Span EdgeSpan
toNonOverlapping()
Convert the Overlapping Stretch Span to a non-overlapping Stretch Span.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
OverlappingStretchSpan
public OverlappingStretchSpan(MultiSegmentSequence multiSegmentSequence) throws java.lang.ExceptionOverlappingStretchSpan constructor- Parameters:
multiSegmentSequence
- The Initial Stretch in the Span- Throws:
java.lang.Exception
- Thrown if the Inputs are invalid
-
-
Method Details
-
addStretch
Description copied from interface:Span
Add a Stretch to the Span- Specified by:
addStretch
in interfaceSpan
- Parameters:
multiSegmentSequence
- Stretch to be added- Returns:
- TRUE - Stretch added successfully
-
getContainingStretch
Description copied from interface:Span
Retrieve the first Stretch that contains the Predictor Ordinate- Specified by:
getContainingStretch
in interfaceSpan
- Parameters:
predictorOrdinate
- The Predictor Ordinate- Returns:
- The containing Stretch
-
getStretch
Description copied from interface:Span
Retrieve the Stretch by Name- Specified by:
getStretch
in interfaceSpan
- Parameters:
name
- The Stretch Name- Returns:
- The Stretch
-
left
public double left() throws java.lang.ExceptionDescription copied from interface:Span
Retrieve the Left Span Edge -
right
public double right() throws java.lang.ExceptionDescription copied from interface:Span
Retrieve the Right Span Edge -
calcResponseValue
public double calcResponseValue(double predictorOrdinate) throws java.lang.ExceptionDescription copied from interface:Span
Compute the Response from the containing Stretches- Specified by:
calcResponseValue
in interfaceSpan
- Parameters:
predictorOrdinate
- The Predictor Ordinate- Returns:
- The Response
- Throws:
java.lang.Exception
- Thrown if the Inputs are invalid
-
calcResponseValueDerivative
public double calcResponseValueDerivative(double predictorOrdinate, int order) throws java.lang.ExceptionDescription copied from interface:Span
Compute the Response Value Derivative from the containing Stretches- Specified by:
calcResponseValueDerivative
in interfaceSpan
- Parameters:
predictorOrdinate
- The Predictor Ordinateorder
- Order of the Derivative to be calculated- Returns:
- The Response Value Derivative
- Throws:
java.lang.Exception
- Thrown if the Inputs are invalid
-
isMergeState
Description copied from interface:Span
Indicate if the specified Label is part of the Merge State at the specified Predictor Ordinate- Specified by:
isMergeState
in interfaceSpan
- Parameters:
predictorOrdinate
- The Predictor OrdinatelatentStateLabel
- Merge State Label- Returns:
- TRUE - The specified Label is part of the Merge State at the specified Predictor Ordinate
-
jackDResponseDManifestMeasure
public WengertJacobian jackDResponseDManifestMeasure(java.lang.String manifestMeasure, double predictorOrdinate, int order)Description copied from interface:Span
Calculate the Response Derivative to the Manifest Measure at the specified Ordinate- Specified by:
jackDResponseDManifestMeasure
in interfaceSpan
- Parameters:
manifestMeasure
- Manifest Measure whose Sensitivity is soughtpredictorOrdinate
- Predictor Ordinateorder
- Order of Derivative desired- Returns:
- Jacobian of the Response Derivative to the Manifest Measure at the Ordinate
-
in
public boolean in(double predictorOrdinate) throws java.lang.ExceptionDescription copied from interface:Span
Check if the Predictor Ordinate is in the Stretch Range -
toNonOverlapping
Convert the Overlapping Stretch Span to a non-overlapping Stretch Span. Overlapping Stretches are clipped from the Left.- Returns:
- The Non-overlapping Stretch Span Instance
-
displayString
public java.lang.String displayString()Description copied from interface:Span
Display the Span Edge Coordinates- Specified by:
displayString
in interfaceSpan
- Returns:
- The Edge Coordinates String
-