38 #include <visp3/core/vpConfig.h> 40 #include <visp3/core/vpMatrix.h> 41 #include <visp3/core/vpMath.h> 42 #include <visp3/core/vpColVector.h> 45 #include <visp3/core/vpException.h> 46 #include <visp3/core/vpMatrixException.h> 49 #include <visp3/core/vpDebug.h> 51 #ifdef VISP_HAVE_LAPACK_C 52 extern "C" void dpotrf_ (
char *uplo,
int *n,
double *a,
int *lda,
int *info);
53 extern "C" int dpotri_(
char *uplo,
int *n,
double *a,
int *lda,
int *info);
56 int rowNum_ = (int)this->
getRows();
57 int lda = (int)rowNum_;
61 dpotrf_((
char*)
"L",&rowNum_,A.
data,&lda,&info);
64 std::cout <<
"cholesky:dpotrf_:error" << std::endl;
66 dpotri_((
char*)
"L",&rowNum_,A.
data,&lda,&info);
68 std::cout <<
"cholesky:dpotri_:error" << std::endl;
72 for(
unsigned int i=0;i<A.
getRows();i++)
73 for(
unsigned int j=0;j<A.
getCols();j++)
74 if(i>j) A[i][j] = A[j][i];
120 "Cannot invert a non-square vpMatrix")) ;
125 #elif !defined(VISP_BUILD_SHARED_LIBS) 127 void dummy_vpMatrixLapack() {};
Implementation of a matrix and operations on matrices.
unsigned int getRows() const
Return the number of rows of the 2D array.
Type * data
Address of the first element of the data array.
unsigned int getCols() const
Return the number of columns of the 2D array.
unsigned int rowNum
Number of rows in the array.
vpMatrix inverseByCholesky() const
unsigned int colNum
Number of columns in the array.
vpMatrix inverseByCholeskyLapack() const
error that can be emited by the vpMatrix class and its derivates