43 #include <visp3/core/vpArray2D.h>
44 #include <visp3/core/vpColVector.h>
45 #include <visp3/core/vpMatrix.h>
46 #include <visp3/core/vpMath.h>
106 rowNum = colNum = dsize = 0;
109 std::ostream & cppPrint(std::ostream & os,
const std::string &matrixName=
"A",
bool octet =
false)
const;
110 std::ostream & csvPrint(std::ostream & os)
const;
117 double d2r = M_PI/180.0;
122 double euclideanNorm()
const;
140 if (c >= colNum || c+rowsize > colNum) {
142 "Cannot extract a (1x%d) row vector from a (1x%d) row vector starting at index %d",
143 rowsize, colNum, c));
149 void init(
const vpRowVector &v,
unsigned int c,
unsigned int ncols);
152 std::ostream & maplePrint(std::ostream & os)
const;
153 std::ostream & matlabPrint(std::ostream & os)
const;
159 inline double &
operator[](
unsigned int n) {
return *(data+n); }
161 inline const double &
operator[](
unsigned int n)
const {
return *(data+n) ; }
187 int print(std::ostream& s,
unsigned int length,
char const* intro=0)
const;
193 double r2d = 180.0/M_PI;
197 void reshape(
vpMatrix & M,
const unsigned int &nrows,
const unsigned int &ncols);
198 vpMatrix reshape(
const unsigned int &nrows,
const unsigned int &ncols);
205 inline void resize(
const unsigned int i,
const bool flagNullify =
true)
220 void resize(
const unsigned int nrows,
const unsigned int ncols,
const bool flagNullify)
224 "Cannot resize a row vector to a (%dx%d) dimension vector that has more than one row",
229 void stack(
const double &d);
233 double sumSquare()
const;
242 static double stdev(
const vpRowVector &v,
const bool useBesselCorrection=
false);
244 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
270 vp_deprecated
void setIdentity(
const double & val=1.0) ;
Implementation of a matrix and operations on matrices.
const double & operator[](unsigned int n) const
Operator that allows to get the value of an element : x = v[i].
static vp_deprecated vpRowVector stackMatrices(const vpRowVector &A, const vpRowVector &B)
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
vpRowVector(const vpRowVector &v)
Copy constructor that allows to construct a row vector from an other one.
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true)
Implementation of row vector and the associated operations.
vpColVector operator*(const double &x, const vpColVector &v)
static vp_deprecated void stackMatrices(const vpRowVector &A, const vpRowVector &B, vpRowVector &C)
vp_deprecated void stackMatrices(const vpRowVector &r)
error that can be emited by ViSP classes.
vpRowVector extract(unsigned int c, unsigned int rowsize) const
vp_deprecated void init()
Implementation of a generic 2D array used as vase class of matrices and vectors.
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify)
vpColVector operator*(const double &x, const vpColVector &v)
double & operator[](unsigned int n)
Operator that allows to set a value of an element : v[i] = x.
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
void resize(const unsigned int i, const bool flagNullify=true)
Implementation of column vector and the associated operations.
vpRowVector(unsigned int n, double val)
Construct a row vector of size n. Each element is set to val.
vpRowVector(unsigned int n)
Construct a row vector of size n. All the elements are initialized to zero.
vpRowVector()
Basic constructor that creates an empty 0-size row vector.