use of dr.math.matrixAlgebra.CholeskyDecomposition in project beast-mcmc by beast-dev.
the class CorrelationToCholesky method transform.
// values = correlation
@Override
protected double[] transform(double[] values) {
SymmetricMatrix R = compoundCorrelationSymmetricMatrix(values, dimVector);
double[] L;
try {
L = (new CholeskyDecomposition(R)).getStrictlyUpperTriangular();
} catch (IllegalDimension illegalDimension) {
throw new RuntimeException("Unable to decompose matrix in LKJ inverse transform.");
}
return L;
}
Aggregations