30 # include <itpp/config.h> 32 # include <itpp/config_msvc.h> 35 #if defined(HAVE_LAPACK) 36 # include <itpp/base/algebra/lapack.h> 45 #if defined(HAVE_LAPACK) 47 bool chol(
const mat &X, mat &F)
56 dpotrf_(&uplo, &n, F._data(), &lda, &info);
59 for (
int i = 0; i < n; i++)
60 for (
int j = i + 1; j < n; j++)
66 bool chol(
const cmat &X, cmat &F)
74 zpotrf_(&uplo, &n, F._data(), &lda, &info);
77 for (
int i = 0; i < n; i++)
78 for (
int j = i + 1; j < n; j++)
86 bool chol(
const mat &X, mat &F)
88 it_error(
"LAPACK library is needed to use chol() function");
92 bool chol(
const cmat &X, cmat &F)
95 it_error(
"LAPACK library is needed to use chol() function");
105 it_warning(
"cholesky factorization didn't succeed");
115 it_warning(
"cholesky factorization didn't succeed");
bool chol(const mat &X, mat &F)
Cholesky factorisation of real symmetric and positive definite matrix.
#define it_warning(s)
Display a warning message.
#define it_error(s)
Abort unconditionally.
Definitions of Cholesky factorisation functions.