and we write . The Gandalf Cholesky factorisation routines apply to all symmetric types of matrix, i.e.

Gan_SquMatrix smS, smL, *psmL; /* declare matrices S & L */ /* ... create and fill matrix S, which must be symmetric and positive definite, create L ... */ gan_symmat_cholesky_q ( &smS, &smL ); /* L = chol(S), OR */ psmL = gan_symmat_cholesky_s ( &smS ); /* L = chol(S) */ gan_symmat_cholesky_i ( &smS ); /* replace S = chol(S) */The last option

**Error detection:** If is not either symmetric or positive definite
in the above routines, `NULL` is returned and the Gandalf error handler
is invoked. Another failure mode is failing to create the result matrix.

2006-03-17