|
PLaSK library
|
#include <solvers/gain/wasiak/wzmocnienie/jama/jama_cholesky.h>
Public Member Functions | |
| Cholesky () | |
| Cholesky (const Array2D< Real > &A) | |
| Constructs a lower triangular matrix L, such that L*L'= A. | |
| Array2D< Real > | getL () const |
| Array1D< Real > | solve (const Array1D< Real > &B) |
| Solve a linear system A*x = b, using the previously computed cholesky factorization of A: L*L'. | |
| Array2D< Real > | solve (const Array2D< Real > &B) |
| Solve a linear system A*X = B, using the previously computed cholesky factorization of A: L*L'. | |
| int | is_spd () const |
For a symmetric, positive definite matrix A, this function computes the Cholesky factorization, i.e. it computes a lower triangular matrix L such that A = L*L'. If the matrix is not symmetric or positive definite, the function computes only a partial decomposition. This can be tested with the is_spd() flag.
Typical usage looks like:
Array2D<double> A(n,n);
Array2D<double> L;
...
Cholesky<double> chol(A);
if (chol.is_spd())
L = chol.getL();
else
cout << "factorization was not complete.\n";
(Adapted from JAMA, a Java Matrix Library, developed by jointly by the Mathworks and NIST; see http://math.nist.gov/javanumerics/jama).
Definition at line 49 of file jama_cholesky.h.
| JAMA::Cholesky< Real >::Cholesky | ( | ) |
Definition at line 66 of file jama_cholesky.h.
| JAMA::Cholesky< Real >::Cholesky | ( | const Array2D< Real > & | A | ) |
Constructs a lower triangular matrix L, such that L*L'= A.
If A is not symmetric positive-definite (SPD), only a partial factorization is performed. If is_spd() evalutate true (1) then the factorizaiton was successful.
Definition at line 94 of file jama_cholesky.h.
| Array2D< Real > JAMA::Cholesky< Real >::getL | ( | ) | const |
Definition at line 82 of file jama_cholesky.h.
| int JAMA::Cholesky< Real >::is_spd | ( | ) | const |
Definition at line 73 of file jama_cholesky.h.
| Array1D< Real > JAMA::Cholesky< Real >::solve | ( | const Array1D< Real > & | b | ) |
Solve a linear system A*x = b, using the previously computed cholesky factorization of A: L*L'.
| B | A Matrix with as many rows as A and any number of columns. |
Definition at line 148 of file jama_cholesky.h.
| Array2D< Real > JAMA::Cholesky< Real >::solve | ( | const Array2D< Real > & | B | ) |
Solve a linear system A*X = B, using the previously computed cholesky factorization of A: L*L'.
| B | A Matrix with as many rows as A and any number of columns. |
Definition at line 190 of file jama_cholesky.h.