public class Cholesky extends Object implements Serializable, Cloneable
double.
Class Cholesky uses the Cholesky-Banachiewicz algortithm to
factor the matrix A.
The Cholesky factorization of a matrix is
,
where R is a lower triangular matrix. Thus,



The method update is based on the LINPACK routine SCHUD;
see Dongarra et al. (1979) and updates the
Cholesky factorization
of the real symmetric positive definite matrix A after a rank-one matrix is added.
Given this factorization, update computes the factorization
such that
![]()
downdate, based on the LINPACK routine SCHDD;
see Dongarra et al. (1979), downdates the downdate computes the factorization ![]()
downdate determines an orthogonal matrix U as the product
of Givens rotations, such that
![]()
By multiplying this equation by its transpose and noting that
,
the desired result
![]()
Let a be the solution of the linear system
and let
![]()
The Givens rotations,
, are chosen such that
![]()
The
, are (N + 1) by (N + 1) matrices of the form
![G_i =
left[ {begin{array}{*{20}c}{
I_{i - 1} } & 0 & 0 & 0 \
0 & {c_i } & 0 & { - s_i } \
0 & 0 & {I_{N - i} } & 0 \
0 & {s_i } & 0 & {c_i } \
end{array}} right]](eqn_1949.png)
The Givens rotations are then used to form
![]()
The matrix
![]()
![]()
![]()
| Modifier and Type | Class and Description |
|---|---|
static class |
Cholesky.NotSPDException
The matrix is not symmetric, positive definite.
|
| Constructor and Description |
|---|
Cholesky(double[][] a)
Create the Cholesky factorization of a symmetric positive definite
matrix of type
double. |
| Modifier and Type | Method and Description |
|---|---|
void |
downdate(double[] x)
Downdates the factorization by subtracting a rank-1 matrix.
|
double[][] |
getR()
Returns the R matrix that results from the Cholesky factorization.
|
double[][] |
inverse()
Returns the inverse of this matrix
|
double[] |
solve(double[] b)
Solve Ax = b where A is a positive definite matrix with elements of type
double. |
void |
update(double[] x)
Updates the factorization by adding a rank-1 matrix.
|
public Cholesky(double[][] a)
throws SingularMatrixException,
Cholesky.NotSPDException
double.a - a double square matrix to be factoredIllegalArgumentException - Thrown when the row lengths of matrix a are not equal
(for example, the matrix edges are "jagged".)SingularMatrixException - Thrown when the input matrix A is singular.Cholesky.NotSPDException - Thrown when the input matrix is not symmetric, positive definite.public void downdate(double[] x)
throws Cholesky.NotSPDException
x - A double array which specifies the rank-1 matrix.
x is not modified by this function.Cholesky.NotSPDException - if public double[][] getR()
double matrix which contains the lower
triangular R matrix that results from the Cholesky
factorization such that public double[][] inverse()
double matrix containing the inversepublic double[] solve(double[] b)
double.b - a double array containing the right-hand side of the linear
systemdouble array containing the solution to the system of
linear equationspublic void update(double[] x)
x - A double array which specifies the rank-1 matrix.
x is not modified by this function.Copyright © 1970-2015 Rogue Wave Software
Built March 24 2015.