Package jdistlib.accelerator
Class CholeskyFactor
java.lang.Object
jdistlib.accelerator.CholeskyFactor
Immutable lower Cholesky factor with reusable SPD solves.
-
Constructor Summary
ConstructorsConstructorDescriptionCholeskyFactor(int dimension, double[] lower) Creates a factor from a row-major lower-triangular matrix. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the matrix dimension.doubleReturns the log determinant of the original SPD matrix.double[]lower()Returns a row-major copy of the lower-triangular factor.double[]solve(double[] right) SolvesA*x=right.double[]solve(double[] right, int columns) SolvesA*X=rightfor a row-major matrix with the given column count.
-
Constructor Details
-
CholeskyFactor
public CholeskyFactor(int dimension, double[] lower) Creates a factor from a row-major lower-triangular matrix.
-
-
Method Details
-
dimension
public int dimension()Returns the matrix dimension. -
lower
public double[] lower()Returns a row-major copy of the lower-triangular factor. -
logDeterminant
public double logDeterminant()Returns the log determinant of the original SPD matrix. -
solve
public double[] solve(double[] right) SolvesA*x=right. -
solve
public double[] solve(double[] right, int columns) SolvesA*X=rightfor a row-major matrix with the given column count.
-