Class SumToOne
- java.lang.Object
-
- com.opengamma.strata.math.impl.minimization.SumToOne
-
public class SumToOne extends Object
For a set of N-1 "fit" parameters, produces N "model" parameters that sum to one.
-
-
Constructor Summary
Constructors Constructor Description SumToOne(int n)
For a set of N-1 "fit" parameters, produces N "model" parameters that sum to one.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static int[][]
getSet(int n)
double[]
inverseTransform(double[] modelParms)
Inverse transform from the N "model" parameters to the N-1 "fit" parameters.DoubleArray
inverseTransform(DoubleArray modelParms)
Inverse transform from the N "model" parameters to the N-1 "fit" parameters.double[][]
jacobian(double[] fitParms)
The N by N-1 Jacobian matrix between the N "model" parameters (that sum to one) and the N-1 "fit" parameters.DoubleMatrix
jacobian(DoubleArray fitParms)
The N by N-1 Jacobian matrix between the N "model" parameters (that sum to one) and the N-1 "fit" parameters.double[]
transform(double[] fitParms)
Transform from the N-1 "fit" parameters to the N "model" parameters.DoubleArray
transform(DoubleArray fitParms)
Transform from the N-1 "fit" parameters to the N "model" parameters.
-
-
-
Method Detail
-
transform
public double[] transform(double[] fitParms)
Transform from the N-1 "fit" parameters to the N "model" parameters.- Parameters:
fitParms
- The N-1 "fit" parameters- Returns:
- The N "model" parameters
-
transform
public DoubleArray transform(DoubleArray fitParms)
Transform from the N-1 "fit" parameters to the N "model" parameters.- Parameters:
fitParms
- The N-1 "fit" parameters- Returns:
- The N "model" parameters
-
inverseTransform
public double[] inverseTransform(double[] modelParms)
Inverse transform from the N "model" parameters to the N-1 "fit" parameters. Used mainly to find the start position of a optimisation routine.- Parameters:
modelParms
- The N "model" parameters. These must sum to one- Returns:
- The N-1 "fit" parameters
-
inverseTransform
public DoubleArray inverseTransform(DoubleArray modelParms)
Inverse transform from the N "model" parameters to the N-1 "fit" parameters. Used mainly to find the start position of a optimisation routine.- Parameters:
modelParms
- The N "model" parameters. These must sum to one- Returns:
- The N-1 "fit" parameters
-
jacobian
public double[][] jacobian(double[] fitParms)
The N by N-1 Jacobian matrix between the N "model" parameters (that sum to one) and the N-1 "fit" parameters.- Parameters:
fitParms
- The N-1 "fit" parameters- Returns:
- The N by N-1 Jacobian matrix
-
jacobian
public DoubleMatrix jacobian(DoubleArray fitParms)
The N by N-1 Jacobian matrix between the N "model" parameters (that sum to one) and the N-1 "fit" parameters.- Parameters:
fitParms
- The N-1 "fit" parameters- Returns:
- The N by N-1 Jacobian matrix
-
getSet
protected static int[][] getSet(int n)
-
-