42 #include <visp/vpConfig.h>
44 #include <visp/vpMatrix.h>
45 #include <visp/vpMath.h>
46 #include <visp/vpColVector.h>
49 #include <visp/vpException.h>
50 #include <visp/vpMatrixException.h>
53 #include <visp/vpDebug.h>
55 #ifdef VISP_HAVE_LAPACK
56 extern "C" void dpotrf_ (
char *uplo,
int *n,
double *a,
int *lda,
int *info);
57 extern "C" int dpotri_(
char *uplo,
int *n,
double *a,
int *lda,
int *info);
61 #ifdef VISP_HAVE_LAPACK
64 int lda = (int)rowNum;
68 dpotrf_((
char*)
"L",&rowNum,A.
data,&lda,&info);
71 std::cout <<
"cholesky:dpotrf_:error" << std::endl;
73 dpotri_((
char*)
"L",&rowNum,A.
data,&lda,&info);
75 std::cout <<
"cholesky:dpotri_:error" << std::endl;
80 for(
unsigned int i=0;i<A.
getRows();i++)
81 for(
unsigned int j=0;j<A.
getCols();j++)
82 if(i>j) A[i][j] = A[j][i];
122 #if defined(VISP_HAVE_LAPACK)
131 "Cannot invert a non-square vpMatrix")) ;
133 #ifdef VISP_HAVE_LAPACK
Definition of the vpMatrix class.
vpMatrix inverseByCholesky() const
vpMatrix inverseByCholeskyLapack() const
double * data
address of the first element of the data array
unsigned int rowNum
number of rows
unsigned int getCols() const
Return the number of columns of the matrix.
error that can be emited by the vpMatrix class and its derivates
unsigned int colNum
number of columns
unsigned int getRows() const
Return the number of rows of the matrix.