Navigation

Operators and Keywords

Function List:

C++ API

chol.cc File Reference

#include "CmplxCHOL.h"
#include "dbleCHOL.h"
#include "fCmplxCHOL.h"
#include "floatCHOL.h"
#include "SparseCmplxCHOL.h"
#include "SparsedbleCHOL.h"
#include "oct-spparms.h"
#include "sparse-util.h"
#include "ov-re-sparse.h"
#include "ov-cx-sparse.h"
#include "defun-dld.h"
#include "error.h"
#include "gripes.h"
#include "oct-obj.h"
#include "utils.h"

Include dependency graph for chol.cc:


Functions

 DEFUN_DLD (chol, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{r} =} chol (@var{a})\n\ @deftypefnx {Loadable Function} {[@var{r}, @var{p}] =} chol (@var{a})\n\ @deftypefnx {Loadable Function} {[@var{r}, @var{p}, @var{q}] =} chol (@var{s})\n\ @deftypefnx {Loadable Function} {[@var{r}, @var{p}, @var{q}] =} chol (@var{s}, 'vector')\n\ @deftypefnx {Loadable Function} {[@var{l}, @dots{}] =} chol (@dots{}, 'lower')\n\ @cindex Cholesky factorization\n\ Compute the Cholesky factor, @var{r}, of the symmetric positive definite\n\ matrix @var{a}, where\n\ @iftex\n\ @tex\n\ $ R^T R = A $.\n\ @end tex\n\ @end iftex\n\ @ifnottex\n\ \n\ @example\n\ @var{r}' * @var{r} = @var{a}.\n\ @end example\n\ @end ifnottex\n\ \n\ Called with one output argument @code{chol} fails if @var{a} or @var{s} is\n\ not positive definite. With two or more output arguments @var{p} flags\n\ whether the matrix was positive definite and @code{chol} does not fail. A\n\ zero value indicated that the matrix was positive definite and the @var{r}\n\ gives the factorization, and @var{p} will have a positive value otherwise.\n\ \n\ If called with 3 outputs then a sparsity preserving row/column permutation\n\ is applied to @var{a} prior to the factorization. That is @var{r}\n\ is the factorization of @code{@var{a}(@var{q},@var{q})} such that\n\ @iftex\n\ @tex\n\ $ R^T R = Q^T A Q$.\n\ @end tex\n\ @end iftex\n\ @ifnottex\n\ \n\ @example\n\ @var{r}' * @var{r} = @var{q}' * @var{a} * @var{q}.\n\ @end example\n\ @end ifnottex\n\ \n\ The sparsity preserving permutation is generally returned as a matrix.\n\ However, given the flag 'vector', @var{q} will be returned as a vector\n\ such that\n\ @iftex\n\ @tex\n\ $ R^T R = A (Q, Q)$.\n\ @end tex\n\ @end iftex\n\ @ifnottex\n\ \n\ @example\n\ @var{r}' * @var{r} = a (@var{q}, @var{q}).\n\ @end example\n\ @end ifnottex\n\ \n\ Called with either a sparse or full matrix and using the 'lower' flag,\n\ @code{chol} returns the lower triangular factorization such that\n\ @iftex\n\ @tex\n\ $ L L^T = A $.\n\ @end tex\n\ @end iftex\n\ @ifnottex\n\ \n\ @example\n\ @var{l} * @var{l}' = @var{a}.\n\ @end example\n\ @end ifnottex\n\ \n\ In general the lower triangular factorization is significantly faster for\n\ sparse matrices.\n\ @seealso{cholinv, chol2inv}\n\ @end deftypefn")
 DEFUN_DLD (cholinv, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} cholinv (@var{a})\n\ Use the Cholesky factorization to compute the inverse of the\n\ symmetric positive definite matrix @var{a}.\n\ @seealso{chol, chol2inv}\n\ @end deftypefn")
 DEFUN_DLD (chol2inv, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} chol2inv (@var{u})\n\ Invert a symmetric, positive definite square matrix from its Cholesky\n\ decomposition, @var{u}. Note that @var{u} should be an upper-triangular\n\ matrix with positive diagonal elements. @code{chol2inv (@var{u})}\n\ provides @code{inv (@var{u}'*@var{u})} but it is much faster than\n\ using @code{inv}.\n\ @seealso{chol, cholinv}\n\ @end deftypefn")
 DEFUN_DLD (cholupdate, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{R1}, @var{info}] =} cholupdate (@var{R}, @var{u}, @var{op})\n\ Update or downdate a Cholesky factorization. Given an upper triangular\n\ matrix @var{R} and a column vector @var{u}, attempt to determine another\n\ upper triangular matrix @var{R1} such that\n\ @itemize @bullet\n\ @item\n\ @var{R1}'*@var{R1} = @var{R}'*@var{R} + @var{u}*@var{u}'\n\ if @var{op} is \"+\"\n\ @item\n\ @var{R1}'*@var{R1} = @var{R}'*@var{R} - @var{u}*@var{u}'\n\ if @var{op} is \"-\"\n\ @end itemize\n\ \n\ If @var{op} is \"-\", @var{info} is set to\n\ @itemize\n\ @item 0 if the downdate was successful,\n\ @item 1 if @var{R}'*@var{R} - @var{u}*@var{u}' is not positive definite,\n\ @item 2 if @var{R} is singular.\n\ @end itemize\n\ \n\ If @var{info} is not present, an error message is printed in cases 1 and 2.\n\ @seealso{chol, qrupdate}\n\ @end deftypefn")
 DEFUN_DLD (cholinsert, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{R1}, @var{info}] =} cholinsert (@var{R}, @var{j}, @var{u})\n\ Given a Cholesky@tie{}factorization of a real symmetric or complex hermitian\n\ positive definite matrix @w{@var{A} = @var{R}'*@var{R}}, @var{R}@tie{}upper triangular,\n\ return the Cholesky@tie{}factorization of\n\ @var{A1}, where @w{A1(p,p) = A}, @w{A1(:,j) = A1(j,:)' = u} and\n\ @w{p = [1:j-1,j+1:n+1]}. @w{u(j)} should be positive.\n\ On return, @var{info} is set to\n\ @itemize\n\ @item 0 if the insertion was successful,\n\ @item 1 if @var{A1} is not positive definite,\n\ @item 2 if @var{R} is singular.\n\ @end itemize\n\ \n\ If @var{info} is not present, an error message is printed in cases 1 and 2.\n\ @seealso{chol, cholupdate, choldelete}\n\ @end deftypefn")
 DEFUN_DLD (choldelete, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{R1} =} choldelete (@var{R}, @var{j})\n\ Given a Cholesky@tie{}factorization of a real symmetric or complex hermitian\n\ positive definite matrix @w{@var{A} = @var{R}'*@var{R}}, @var{R}@tie{}upper triangular,\n\ return the Cholesky@tie{}factorization of @w{A(p,p)}, where @w{p = [1:j-1,j+1:n+1]}.\n\ @seealso{chol, cholupdate, cholinsert}\n\ @end deftypefn")
 DEFUN_DLD (cholshift, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{R1} =} cholshift (@var{R}, @var{i}, @var{j})\n\ Given a Cholesky@tie{}factorization of a real symmetric or complex hermitian\n\ positive definite matrix @w{@var{A} = @var{R}'*@var{R}}, @var{R}@tie{}upper triangular,\n\ return the Cholesky@tie{}factorization of\n\ @w{@var{A}(p,p)}, where @w{p} is the permutation @*\n\ @code{p = [1:i-1, shift(i:j, 1), j+1:n]} if @w{@var{i} < @var{j}} @*\n\ or @*\n\ @code{p = [1:j-1, shift(j:i,-1), i+1:n]} if @w{@var{j} < @var{i}}. @*\n\ \n\ @seealso{chol, cholinsert, choldelete}\n\ @end deftypefn")

Function Documentation

DEFUN_DLD ( cholshift  ,
args   
)

DEFUN_DLD ( choldelete  ,
args   
)

DEFUN_DLD ( cholinsert  ,
args  ,
nargout   
)

DEFUN_DLD ( cholupdate  ,
args  ,
nargout   
)

DEFUN_DLD ( chol2inv  ,
args   
)

DEFUN_DLD ( cholinv  ,
args   
)

DEFUN_DLD ( chol  ,
args  ,
nargout   
)