cholesky< Matrix > Programmers Guide Contents | Index |  Search

Category:itl,functors Component type:type
Description
For use with symmetric matrices.
``` Usage:
SymMatrix A;
cholesky< SymMartix > precond(A);
qmr(A, x, b, precond.left(), precond.right(), iter);
cg(A, x, b, precond(), iter);
```
Notes: The idea under a concrete Preconditioner such as Incomplete Cholesky is to create a Preconditioner object to use in iterative methods.
Example
In cholesky.cc:
```typedef matrix<Type,
symmetric<lower>,
array< compressed<> >,
row_major>::type Matrix;
Matrix A(5);
dense1D<Type> x(A.nrows(), Type(0));
dense1D<Type> b(A.ncols());
for (dense1D<Type>::iterator i=b.begin(); i!=b.end(); i++)
*i = 1.;
//inomplete cholesky preconditioner
cholesky<Matrix> precond(A);
noisy_iteration<double> iter(b, max_iter, 1e-6);
cg(A, x, b, precond(), iter);

```
Definition
cholesky.h
Template Parameters

ParameterDescriptionDefault
MatrixA symmetric Matrix
Model of
Members
Member Where defined Description
Precond
Left
Right
cholesky (const SymMatrix& A)
Precond operator() ()   return a left or right Preconditioner object
Left left ()   return a left part of Split Preconditioner object
Right right ()   return a right part of Split Preconditioner object
void print ()
New members
Notes