Package org.drip.spline.grid
Class AggregatedSpan
java.lang.Object
org.drip.spline.grid.AggregatedSpan
- All Implemented Interfaces:
Span
public class AggregatedSpan extends java.lang.Object implements Span
AggregatedSpan implements the Span interface. Here response from an array of spans whose responses
are aggregated by their weights.
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description AggregatedSpan(java.util.List<Span> spanList, java.util.List<java.lang.Double> weightList)
AggregatedSpan 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 EdgeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AggregatedSpan
public AggregatedSpan(java.util.List<Span> spanList, java.util.List<java.lang.Double> weightList) throws java.lang.ExceptionAggregatedSpan Constructor- Parameters:
spanList
- List of SpansweightList
- List of Weights- 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 -
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
-