39 #include <visp3/core/vpArray2D.h>
40 #include <visp3/core/vpColVector.h>
41 #include <visp3/core/vpMath.h>
42 #include <visp3/core/vpMatrix.h>
128 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
148 if (rowPtrs != NULL) {
152 rowNum = colNum = dsize = 0;
155 std::ostream &cppPrint(std::ostream &os,
const std::string &matrixName =
"A",
bool octet =
false)
const;
156 std::ostream &csvPrint(std::ostream &os)
const;
164 double d2r = M_PI / 180.0;
188 if (c >= colNum || c + rowsize > colNum) {
190 "Cannot extract a (1x%d) row vector from a (1x%d) "
191 "row vector starting at index %d",
192 rowsize, colNum, c));
198 double frobeniusNorm()
const;
199 void init(
const vpRowVector &v,
unsigned int c,
unsigned int ncols);
202 std::ostream &maplePrint(std::ostream &os)
const;
203 std::ostream &matlabPrint(std::ostream &os)
const;
209 inline double &
operator[](
unsigned int n) {
return *(data + n); }
211 inline const double &
operator[](
unsigned int n)
const {
return *(data + n); }
219 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
246 int print(std::ostream &s,
unsigned int length,
char const *intro = 0)
const;
253 double r2d = 180.0 / M_PI;
258 void reshape(
vpMatrix &M,
const unsigned int &nrows,
const unsigned int &ncols);
278 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify)
282 "Cannot resize a row vector to a (%dx%d) dimension "
283 "vector that has more than one row",
288 void stack(
double d);
292 double sumSquare()
const;
294 std::vector<double> toStdVector()
const;
302 static double stdev(
const vpRowVector &v,
bool useBesselCorrection =
false);
304 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
336 vp_deprecated
double euclideanNorm()
const;
Implementation of a generic 2D array used as base class for matrices and vectors.
void insert(const vpArray2D< Type > &A, unsigned int r, unsigned int c)
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
vpArray2D< Type > t() const
Compute the transpose of the array.
bool operator!=(const vpArray2D< Type > &A) const
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
void reshape(unsigned int nrows, unsigned int ncols)
bool operator==(const vpArray2D< Type > &A) const
Implementation of column vector and the associated operations.
error that can be emitted by ViSP classes.
VISP_EXPORT vpImagePoint operator*(const vpImagePoint &ip1, double scale)
Implementation of a matrix and operations on matrices.
Implementation of row vector and the associated operations.
vp_deprecated void setIdentity(const double &val=1.0)
vpRowVector(const vpRowVector &v)
vpRowVector(unsigned int n, double val)
Construct a row vector of size n. Each element is set to val.
double & operator[](unsigned int n)
Operator that allows to set a value of an element : v[i] = x.
vpRowVector(unsigned int n)
static vp_deprecated vpRowVector stackMatrices(const vpRowVector &A, const vpRowVector &B)
vp_deprecated void stackMatrices(const vpRowVector &r)
void resize(unsigned int i, bool flagNullify=true)
vpRowVector()
Basic constructor that creates an empty 0-size row vector.
vpRowVector(const std::initializer_list< double > &list)
vp_deprecated void init()
static vp_deprecated void stackMatrices(const vpRowVector &A, const vpRowVector &B, vpRowVector &C)
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify)
const double & operator[](unsigned int n) const
Operator that allows to get the value of an element : x = v[i].
vpRowVector extract(unsigned int c, unsigned int rowsize) const
vpColVector operator*(const double &x, const vpColVector &v)