49 #include <visp/vpMatrix.h>
50 #include <visp/vpMatrixException.h>
51 #include <visp/vpRowVector.h>
52 #include <visp/vpColVector.h>
53 #include <visp/vpDebug.h>
62 for (
unsigned int i=0; i<
rowNum; i++) {
63 for (
unsigned int j=0; j<
colNum; j++) {
92 for (
unsigned int i=0; i<
rowNum; i++) {
93 for (
unsigned int j=0; j<
colNum; j++) {
116 unsigned int nelements = x.
getRows();
120 "\n\t\t Illegal matrix operation, bad vector size")) ;
125 for (
unsigned int i=0; i<nelements; i++) {
126 scalar += (*this)[i] * x[i];
152 vpERROR_TRACE(
"vpMatrix mismatch in vpRowVector/matrix multiply") ;
158 for (
unsigned int i=0;i<
colNum;i++) {
160 double bi =
data[i] ;
161 for (
unsigned int j=0;j<A.
getCols();j++) {
250 if(
dsize!=nrows*ncols)
252 vpERROR_TRACE(
"\n\t\t vpSubRowVector mismatch size for reshape vpSubColVector in a vpMatrix") ;
254 "\n\t\t \n\t\t vpSubRowVector mismatch size for reshape vpSubColVector in a vpMatrix")) ;
263 std::cout << me << std::endl ;
266 for(
unsigned int i =0; i< nrows; i++)
267 for(
unsigned int j =0; j< ncols; j++)
268 m[i][j]=
data[i*nrows+j];
Definition of the vpMatrix class.
void resize(const unsigned int nrows, const unsigned int ncols, const bool nullify=true)
Definition of the row vector class.
vpRowVector & normalize()
normalise the vector
error that can be emited by ViSP classes.
double sumSquare() const
return sum of the Aij^2 (for all i, for all j)
double * data
address of the first element of the data array
double ** rowPtrs
address of the first element of each rows
vpColVector t() const
Transpose the vector.
double operator*(const vpColVector &x) const
operator dot product
unsigned int rowNum
number of rows
void resize(unsigned int i)
Set the size of the Row vector.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void reshape(vpMatrix &m, const unsigned int &nrows, const unsigned int &ncols)
Reshape methods.
unsigned int getCols() const
Return the number of columns of the matrix.
error that can be emited by the vpMatrix class and its derivates
vpRowVector & operator=(const vpRowVector &v)
Copy operator. Allow operation such as A = v.
unsigned int dsize
Current size (rowNum * colNum)
unsigned int colNum
number of columns
unsigned int getRows() const
Return the number of rows of the matrix.
vpRowVector()
basic constructor