NAME
cholesky_decomposition - Performs Cholesky decomposition on a matrix, using a method hand-coded for
SYNOPSIS
#include "n/n_cholesky.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int cholesky_decomposition
(
Matrix **target_mpp,
const Matrix *input_mp
);
DESCRIPTION
the KJB library.
This routine finds matrix L such that LL' = A. A must be positive definite.
The first argument is the adress of the target matrix. If the target matrix
itself is null, then a matrix of the appropriate size is created. If the
target matrix is the wrong size, it is resized. Finally, if it is the right
size, then the storage is recycled, as is.
If input and output matrices point to the same address, a temporary matrix
will be allocated as a workspace, which will swapped with A before returning.
Passing NULL as the source matrix will free L, set it to NULL and return
NO_ERROR.
The operation may be performed in one of several ways. The method used can be
set using the option "cholesky-method" which is normally exposed to
the user. If this options is "native" (the default), then we compute the
Cholesky decomposition using a native KJB implementation. If this option
is "lapack," Cholesky decomposition is perfomed by Lapack's DBOTRF subroutine.
The lapack version is slightly more forgiving on ill-conditioned matrices.
RETURNS
Returns ERROR on failure, setting the the errors string accordingly, and
NO_ERROR otherwise.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Ernesto Brau
DOCUMENTER
Ernesto Brau
SEE ALSO
do_native_cholesky_decomposition