Class WengertJacobian
java.lang.Object
org.drip.numerical.differentiation.WengertJacobian
public class WengertJacobian
extends java.lang.Object
WengertJacobian contains the Jacobian of the given set of Wengert variables to the set of
parameters. It exposes the following functionality:
- Set/Retrieve the Wengert variables
- Accumulate the Partials
- Scale the partial entries
- Merge the Jacobian with another
- Retrieve the WengertJacobian elements
- Display the contents of the WengertJacobian
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Numerical Quadrature, Differentiation, Eigenization, Linear Algebra, and Utilities
- Package = R1 To R1 Numerical Differentiation
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description WengertJacobian(int iNumWengerts, int iNumParameters)
WengertJacobian constructor -
Method Summary
Modifier and Type Method Description boolean
accumulatePartialFirstDerivative(int iWengertIndex, int iParameterIndex, double dblDWengertDParameter)
Accumulate {D(Wengert)}/{D(Parameter)}boolean
cumulativeMerge(WengertJacobian wjOther)
Accumulate and merge partial entries from the other CurveWengertJacobianboolean
cumulativeMerge(WengertJacobian wjOther, double dblWeight)
Accumulate and merge the weighted partial entries from the other CurveWengertJacobianjava.lang.String
displayString()
Stringifies the contents of WengertJacobiandouble
firstDerivative(int iWengertIndex, int iParameterIndex)
Retrieve {D(Wengert)}/{D(Parameter)} for the Wengert and the parameter identified by their indicesint
numParameters()
Retrieve the number of Parametersint
numWengerts()
Retrieve the number of Wengert Variablesboolean
scale(double dblScale)
Scale the partial entriesboolean
setWengert(int iWengertIndex, double dblWengert)
Set the Value for the Wengert variabledouble
wengert(int iIndex)
Get the Value for the Wengert VariableMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WengertJacobian
public WengertJacobian(int iNumWengerts, int iNumParameters) throws java.lang.ExceptionWengertJacobian constructor- Parameters:
iNumWengerts
- Number of Wengert variablesiNumParameters
- Number of Parameters- Throws:
java.lang.Exception
- Thrown if the inputs are invalid
-
-
Method Details
-
numWengerts
public int numWengerts()Retrieve the number of Wengert Variables- Returns:
- Number of Wengert Variables
-
numParameters
public int numParameters()Retrieve the number of Parameters- Returns:
- Number of Parameters
-
setWengert
public boolean setWengert(int iWengertIndex, double dblWengert)Set the Value for the Wengert variable- Parameters:
iWengertIndex
- Wengert Variable IndexdblWengert
- The Value for the Wengert Variable- Returns:
- TRUE - Successfully set
-
wengert
public double wengert(int iIndex) throws java.lang.ExceptionGet the Value for the Wengert Variable- Parameters:
iIndex
- Wengert Variable Index- Returns:
- The Value for the Wengert variable
- Throws:
java.lang.Exception
- Thrown if the inputs are invalid
-
accumulatePartialFirstDerivative
public boolean accumulatePartialFirstDerivative(int iWengertIndex, int iParameterIndex, double dblDWengertDParameter)Accumulate {D(Wengert)}/{D(Parameter)}- Parameters:
iWengertIndex
- Wengert Variable IndexiParameterIndex
- Parameter IndexdblDWengertDParameter
- The incremental {D(Wengert)}/{D(Parameter)}- Returns:
- TRUE - Successfully set
-
firstDerivative
public double firstDerivative(int iWengertIndex, int iParameterIndex)Retrieve {D(Wengert)}/{D(Parameter)} for the Wengert and the parameter identified by their indices- Parameters:
iWengertIndex
- Wengert Variable IndexiParameterIndex
- Parameter Index- Returns:
- {D(Wengert)}/{D(Parameter)}
-
cumulativeMerge
Accumulate and merge partial entries from the other CurveWengertJacobian- Parameters:
wjOther
- CurveWengertJacobian to be accumulated and merged- Returns:
- TRUE - Successfully accumulated and merged
-
cumulativeMerge
Accumulate and merge the weighted partial entries from the other CurveWengertJacobian- Parameters:
wjOther
- CurveWengertJacobian to be accumulated and mergeddblWeight
- The Weight- Returns:
- TRUE - Successfully accumulated and merged
-
scale
public boolean scale(double dblScale)Scale the partial entries- Parameters:
dblScale
- Factor by which the partials are to be scaled by- Returns:
- TRUE - Scaling down successful
-
displayString
public java.lang.String displayString()Stringifies the contents of WengertJacobian- Returns:
- Stringified WengertJacobian
-