Package org.apache.spark.mllib.linalg
Class CholeskyDecomposition
Object
org.apache.spark.mllib.linalg.CholeskyDecomposition
Compute Cholesky decomposition.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double[]
inverse
(double[] UAi, int k) Computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U.static double[]
solve
(double[] A, double[] bx) Solves a symmetric positive definite linear system via Cholesky factorization.
-
Constructor Details
-
CholeskyDecomposition
public CholeskyDecomposition()
-
-
Method Details
-
solve
public static double[] solve(double[] A, double[] bx) Solves a symmetric positive definite linear system via Cholesky factorization. The input arguments are modified in-place to store the factorization and the solution.- Parameters:
A
- the upper triangular part of Abx
- right-hand side- Returns:
- the solution array
-
inverse
public static double[] inverse(double[] UAi, int k) Computes the inverse of a real symmetric positive definite matrix A using the Cholesky factorization A = U**T*U. The input arguments are modified in-place to store the inverse matrix.- Parameters:
UAi
- the upper triangular factor U from the Cholesky factorization A = U**T*Uk
- the dimension of A- Returns:
- the upper triangle of the (symmetric) inverse of A
-