41 #include <visp3/core/vpConfig.h>
42 #include <visp3/core/vpException.h>
43 #include <visp3/core/vpTime.h>
44 #include <visp3/core/vpArray2D.h>
45 #include <visp3/core/vpRotationMatrix.h>
46 #include <visp3/core/vpHomogeneousMatrix.h>
47 #include <visp3/core/vpVelocityTwistMatrix.h>
48 #include <visp3/core/vpForceTwistMatrix.h>
51 # include <gsl/gsl_math.h>
52 # include <gsl/gsl_eigen.h>
124 unsigned int nrows,
unsigned int ncols) ;
156 rowNum = colNum = dsize = 0;
164 void diag(
const double &val = 1.0);
168 void eye(
unsigned int n) ;
170 void eye(
unsigned int m,
unsigned int n) ;
210 void insert(
const vpMatrix&A,
const unsigned int r,
const unsigned int c);
219 vpRowVector getRow(
const unsigned int i,
const unsigned int j_begin,
const unsigned int size)
const;
221 vpColVector getCol(
const unsigned int j,
const unsigned int i_begin,
const unsigned int size)
const;
222 void init(
const vpMatrix &M,
unsigned int r,
unsigned int c,
unsigned int nrows,
unsigned int ncols);
246 vpMatrix &operator+=(
const double x);
248 vpMatrix &operator-=(
const double x);
250 vpMatrix &operator*=(
const double x);
257 vpMatrix operator/(
const double x)
const;
265 double sumSquare()
const;
267 double det(vpDetMethod method = LU_DECOMPOSITION)
const;
308 #ifndef DOXYGEN_SHOULD_SKIP_THIS
309 void LUDcmp(
unsigned int* perm,
int& d);
314 #endif // doxygen should skip this
317 #if defined(VISP_HAVE_LAPACK_C)
321 vpMatrix inverseByCholeskyLapack()
const;
327 vpMatrix pseudoInverse(
double svThreshold=1e-6)
const;
331 unsigned int pseudoInverse(
vpMatrix &Ap,
double svThreshold=1e-6)
const;
337 unsigned int pseudoInverse(
vpMatrix &Ap,
343 unsigned int pseudoInverse(
vpMatrix &Ap,
354 #ifndef DOXYGEN_SHOULD_SKIP_THIS
360 #if (VISP_HAVE_OPENCV_VERSION >= 0x020101) // Require opencv >= 2.1.1
363 #ifdef VISP_HAVE_LAPACK_C
383 unsigned int kernel(
vpMatrix &KerA,
double svThreshold=1e-6)
const;
403 double euclideanNorm()
const;
404 double infinityNorm()
const;
412 int print(std::ostream& s,
unsigned int length,
char const* intro=0)
const;
413 std::ostream & matlabPrint(std::ostream & os)
const;
414 std::ostream & maplePrint(std::ostream & os)
const;
415 std::ostream & csvPrint(std::ostream & os)
const;
416 std::ostream & cppPrint(std::ostream & os,
const char * matrixName = NULL,
bool octet =
false)
const;
468 static void add2WeightedMatrices(
const vpMatrix &A,
const double &wA,
const vpMatrix &B,
const double &wB,
vpMatrix &C);
469 static void computeHLM(
const vpMatrix &H,
const double &alpha,
vpMatrix &HLM);
519 const bool binary =
false,
char *header = NULL)
551 const bool binary =
false,
552 const char *header =
"")
574 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
615 vp_deprecated
void setIdentity(
const double & val=1.0) ;
620 double detByLU()
const;
628 #ifndef DOXYGEN_SHOULD_SKIP_THIS
Implementation of a matrix and operations on matrices.
static bool save(const std::string &filename, const vpArray2D< Type > &A, const bool binary=false, const char *header="")
static bool saveYAML(const std::string &filename, const vpArray2D< Type > &A, const char *header="")
static bool loadMatrix(const std::string &filename, vpArray2D< double > &M, const bool binary=false, char *header=NULL)
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
static bool loadYAML(const std::string &filename, vpArray2D< Type > &A, char *header=NULL)
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of row vector and the associated operations.
vpColVector operator*(const double &x, const vpColVector &v)
void stack(const vpMatrix &A)
vp_deprecated void stackMatrices(const vpMatrix &A)
Implementation of a generic 2D array used as vase class of matrices and vectors.
unsigned int getCols() const
Return the number of columns of the 2D array.
vpMatrix(unsigned int r, unsigned int c, double val)
Implementation of a rotation matrix and operations on such kind of matrices.
vpColVector operator*(const double &x, const vpColVector &v)
static vp_deprecated void stackMatrices(const vpMatrix &A, const vpMatrix &B, vpMatrix &C)
vp_deprecated void init()
static bool load(const std::string &filename, vpArray2D< Type > &A, const bool binary=false, char *header=NULL)
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
Implementation of a velocity twist matrix and operations on such kind of matrices.
unsigned int getRows() const
Return the number of rows of the 2D array.
static vp_deprecated vpMatrix stackMatrices(const vpMatrix &A, const vpMatrix &B)
vpMatrix(unsigned int r, unsigned int c)
Implementation of a force/torque twist matrix and operations on such kind of matrices.
Implementation of column vector and the associated operations.
virtual ~vpMatrix()
Destructor (Memory de-allocation)
static bool saveMatrixYAML(const std::string &filename, const vpArray2D< double > &M, const char *header="")
static bool saveMatrix(const std::string &filename, const vpArray2D< double > &M, const bool binary=false, const char *header="")
vpMatrix(const vpArray2D< double > &A)
Class that consider the case of a translation vector.
static bool loadMatrixYAML(const std::string &filename, vpArray2D< double > &M, char *header=NULL)