1function [R,p,q] = chol2 (A)						    %#ok
2%CHOL2 sparse Cholesky factorization, A=R'R.
3%   Note that A=L*L' (LCHOL) and A=L*D*L' (LDLCHOL) factorizations are faster
4%   than R'*R (CHOL2 and CHOL) and use less memory.  The LL' and LDL'
5%   factorization methods use tril(A).  This method uses triu(A), just like
6%   the built-in CHOL.
7%
8%   Example:
9%   R = chol2 (A)                 same as R = chol (A), just faster
10%   [R,p] = chol2 (A)             same as [R,p] = chol(A), just faster
11%   [R,p,q] = chol2 (A)           factorizes A(q,q) into R'*R, where q is
12%                                 a fill-reducing ordering
13%
14%   A must be sparse.
15%
16%   See also LCHOL, LDLCHOL, CHOL, LDLUPDATE.
17
18%   Copyright 2006-2007, Timothy A. Davis, http://www.suitesparse.com
19
20error ('chol2 mexFunction not found') ;
21