44 #include <visp3/core/vpArray2D.h> 45 #include <visp3/core/vpColVector.h> 46 #include <visp3/core/vpMath.h> 47 #include <visp3/core/vpMatrix.h> 106 if (rowPtrs != NULL) {
110 rowNum = colNum = dsize = 0;
113 std::ostream &cppPrint(std::ostream &os,
const std::string &matrixName =
"A",
bool octet =
false)
const;
114 std::ostream &csvPrint(std::ostream &os)
const;
122 double d2r = M_PI / 180.0;
127 double euclideanNorm()
const;
146 if (c >= colNum || c + rowsize > colNum) {
148 "Cannot extract a (1x%d) row vector from a (1x%d) " 149 "row vector starting at index %d",
150 rowsize, colNum, c));
156 void init(
const vpRowVector &v,
unsigned int c,
unsigned int ncols);
159 std::ostream &maplePrint(std::ostream &os)
const;
160 std::ostream &matlabPrint(std::ostream &os)
const;
166 inline double &
operator[](
unsigned int n) {
return *(data + n); }
168 inline const double &
operator[](
unsigned int n)
const {
return *(data + n); }
194 int print(std::ostream &s,
unsigned int length,
char const *intro = 0)
const;
201 double r2d = 180.0 / M_PI;
205 void reshape(
vpMatrix &M,
const unsigned int &nrows,
const unsigned int &ncols);
206 vpMatrix reshape(
const unsigned int &nrows,
const unsigned int &ncols);
213 inline void resize(
const unsigned int i,
const bool flagNullify =
true)
228 void resize(
const unsigned int nrows,
const unsigned int ncols,
const bool flagNullify)
232 "Cannot resize a row vector to a (%dx%d) dimension " 233 "vector that has more than one row",
238 void stack(
double d);
242 double sumSquare()
const;
244 std::vector<double> toStdVector();
252 static double stdev(
const vpRowVector &v,
const bool useBesselCorrection =
false);
254 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) 285 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)
Implementation of row vector and the associated operations.
static vp_deprecated void stackMatrices(const vpRowVector &A, const vpRowVector &B, vpRowVector &C)
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true, const bool recopy_=true)
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)
vpRowVector()
Basic constructor that creates an empty 0-size row vector.