 |
Visual Servoing Platform
version 3.3.0
|
39 #ifndef _vpColVector_h_
40 #define _vpColVector_h_
42 #include <visp3/core/vpArray2D.h>
43 #include <visp3/core/vpMath.h>
44 #include <visp3/core/vpPoseVector.h>
45 #include <visp3/core/vpRotationVector.h>
46 #include <visp3/core/vpRowVector.h>
159 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
161 vpColVector(
const std::initializer_list<double> &list)
162 :
vpArray2D<double>(static_cast<unsigned int>(list.
size()), 1) {
163 std::copy(list.begin(), list.end(),
data);
189 std::ostream &
cppPrint(std::ostream &os,
const std::string &matrixName =
"A",
bool octet =
false)
const;
190 std::ostream &
csvPrint(std::ostream &os)
const;
196 inline void deg2rad()
198 double d2r = M_PI / 180.0;
224 "Cannot extract a (%dx1) column vector from a (%dx1) "
225 "column vector starting at index %d",
240 std::ostream &
maplePrint(std::ostream &os)
const;
249 inline const double &
operator[](
unsigned int n)
const {
return *(
data + n); }
259 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
288 int print(std::ostream &s,
unsigned int length,
char const *intro = 0)
const;
294 inline void rad2deg()
296 double r2d = 180.0 / M_PI;
301 void reshape(
vpMatrix &M,
const unsigned int &nrows,
const unsigned int &ncols);
321 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify)
325 "Cannot resize a column vector to a (%dx%d) "
326 "dimension vector that has more than one column",
332 void stack(
double d);
338 std::vector<double> toStdVector();
366 static double stdev(
const vpColVector &v,
bool useBesselCorrection =
false);
368 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
377 vp_deprecated
void init() {}
381 vp_deprecated
vpColVector rows(
unsigned int first_row,
unsigned int last_row)
const
383 return vpColVector(*
this, first_row - 1, last_row - first_row + 1);
388 vp_deprecated
void setIdentity(
const double &val = 1.0);
407 vp_deprecated
void insert(
const vpColVector &v,
unsigned int r,
unsigned int c = 0);
412 #ifndef DOXYGEN_SHOULD_SKIP_THIS
unsigned int colNum
Number of columns in the array.
vpArray2D< Type > hadamard(const vpArray2D< Type > &m) const
vpMatrix operator-() const
void insert(const vpMatrix &A, unsigned int r, unsigned int c)
vpMatrix extract(unsigned int r, unsigned int c, unsigned int nrows, unsigned int ncols) const
std::ostream & maplePrint(std::ostream &os) const
std::ostream & matlabPrint(std::ostream &os) const
double ** rowPtrs
Address of the first element of each rows.
vpMatrix & operator-=(const vpMatrix &B)
Operation A = A - B.
double infinityNorm() const
vpColVector operator*(const double &x, const vpColVector &v)
vpMatrix & operator,(double val)
int print(std::ostream &s, unsigned int length, const std::string &intro="") const
Class that consider the case of a translation vector.
vp_deprecated void stackMatrices(const vpMatrix &A)
vpMatrix operator*(const vpMatrix &B) const
Implementation of a generic 2D array used as base class for matrices and vectors.
void reshape(unsigned int nrows, unsigned int ncols)
Implementation of column vector and the associated operations.
Implementation of a matrix and operations on matrices.
unsigned int rowNum
Number of rows in the array.
vpMatrix operator/(double x) const
Cij = Aij / x (A is unchanged)
std::ostream & cppPrint(std::ostream &os, const std::string &matrixName="A", bool octet=false) const
bool operator==(const vpArray2D< Type > &A) const
Implementation of a generic rotation vector.
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
Implementation of a pose vector and operations on poses.
Type * data
Address of the first element of the data array.
vpMatrix operator+(const vpMatrix &B) const
double frobeniusNorm() const
vpMatrix & operator/=(double x)
Divide all the element of the matrix by x : Aij = Aij / x.
bool operator!=(const vpArray2D< Type > &A) const
vpMatrix & operator*=(double x)
Multiply all the element of the matrix by x : Aij = Aij * x.
vpMatrix & operator+=(const vpMatrix &B)
Operation A = A + B.
double euclideanNorm() const
vp_deprecated void setIdentity(const double &val=1.0)
unsigned int size() const
Return the number of elements of the 2D array.
Type * operator[](unsigned int i)
Set element using A[i][j] = x.
vp_deprecated void init()
Implementation of row vector and the associated operations.
unsigned int dsize
Current array size (rowNum * colNum)
error that can be emited by ViSP classes.
vpColVector(const std::initializer_list< double > &list)
vpMatrix transpose() const
void stack(const vpMatrix &A)
std::ostream & csvPrint(std::ostream &os) const
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)