![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Data Structures | |
| struct | spchol |
Macros | |
| #define | chol_free(A) |
Functions | |
| spchol * | chol_factorize (const dsp *A_in) |
| dsp * | chol_factorize2 (lmat **Cp, const dsp *A_in) |
| void | chol_solve (dmat **x, spchol *A, dmat *y) |
| dsp * | chol_spsolve (spchol *A, const dsp *y) |
| void | chol_free_do (spchol *A) |
| void | chol_save (spchol *A, const char *format,...) |
| spchol * | chol_read (const char *format,...) |
| void | chol_convert (spchol *A, int keep) |
Wraps the CHOLESKY Library to provide a simple interface.
| struct spchol |
| #define chol_free | ( | A | ) |
Factorize a sparse array into LL' with reordering. Errors out if the factorization fails.
| [in] | A_in | Symmetric positive definite sparse matrix. Only the upper triangular part is used. |
Alternative interface to chol_factorize(). Returns the lower triangular cholesky factor as dsp and, if Cp is not NULL, the permutation vector in *Cp.
| [out] | Cp | If not NULL, *Cp is set to a newly allocated permutation vector. The caller frees it. |
| [in] | A_in | Symmetric positive definite sparse matrix. |
Solve A*x=y where the cholesky factor of A is stored in A.
| [in,out] | x | Solution. Allocated if NULL; otherwise overwritten. |
| [in] | A | Cholesky factor. |
| [in] | y | Right hand side. |
Solve A*x=y where Y is sparse. Not good idea to use dsp ** as chol_solve because the result may have different nzmax.
| [in] | A | Cholesky factor with the native cholmod factor L. |
| [in] | y | Sparse right hand side. |
| void chol_free_do | ( | spchol * | A | ) |
Free cholesky factor.
| [in,out] | A | Cholesky factor to free. May be NULL. |
| void chol_save | ( | spchol * | A, |
| const char * | format, | ||
| ... ) |
Save cholesky factor and permutation vector to file.
| [in] | A | Cholesky factor. |
| [in] | format | printf style format of the file name, followed by its arguments. |
| spchol * chol_read | ( | const char * | format, |
| ... ) |
Read cholesky factor form file. In the matlab convention, the upper triangle is saved.
| [in] | format | printf style format of the file name, followed by its arguments. |
| void chol_convert | ( | spchol * | A, |
| int | keep ) |
Convert the internal data type cholesky factor into the lower left diagonal and permutation vector. The internal data A->L is freed if keep is 0.
This routine works only if the factor is using simplicity factor. not supernodal. so, in chol_factorize, we have set c.final_super=0, so that the final result is always in simplicity factor.
| [in,out] | A | Cholesky factor. Cl and Cp are filled. Does nothing if A->L is not set or Cl/Cp already exist. |
| [in] | keep | Whether to keep the internal factor A->L (and A->c). If kept, Cp references A->L->Perm. |