43 #include <visp3/core/vpTranslationVector.h>
120 "Cannot construct a translation vector from a "
121 "%d-dimension column vector",
173 "Cannot build a translation vector from a %d-dimension column vector", v.
size()));
231 for (
unsigned int i = 0; i < 3; i++)
232 s[i] = (*
this)[i] + tv[i];
265 for (
unsigned int i = 0; i < 3; i++)
266 s[i] = (*
this)[i] + v[i];
293 for (
unsigned int i = 0; i < 3; i++)
294 sub[i] = (*
this)[i] - tv[i];
316 for (
unsigned int i = 0; i <
dsize; i++) {
342 for (
unsigned int i = 0; i <
dsize; i++) {
361 for (
unsigned int i = 0; i <
rowNum; i++) {
362 for (
unsigned int j = 0; j < v.
getCols(); j++) {
363 M[i][j] = (*this)[i] * v[j];
379 for (
unsigned int i = 0; i <
rowNum; i++)
393 for (
unsigned int i = 0; i <
rowNum; i++)
417 for (
unsigned int i = 0; i <
dsize; i++) {
442 if (tv.
size() != 3) {
444 "Cannot initialize a translation vector from a "
445 "%d-dimension col vector",
448 unsigned int k = tv.
size();
476 unsigned int k = tv.
rowNum;
505 for (
int i = 0; i < 3; i++)
511 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
531 if (list.size() >
size()) {
534 "Cannot set translation vector out of bounds. It has only %d values while you try to initialize with %d values",
535 size(), list.size()));
537 std::copy(list.begin(), list.end(),
data);
601 "Cannot set translation vector out of bounds. It has only %d values while you try to initialize with %d values",
746 double sum_square = 0.0;
748 for (
unsigned int i = 0; i <
rowNum; i++) {
767 for (
size_t i = 0; i < vec_M.size(); i++) {
768 meanT += (
vpColVector)vec_M[i].getTranslationVector();
770 meanT /=
static_cast<double>(vec_M.size());
787 for (
size_t i = 0; i < vec_t.size(); i++) {
790 meanT /=
static_cast<double>(vec_t.size());
Implementation of a generic 2D array used as base class for matrices and vectors.
unsigned int getCols() const
Type * data
Address of the first element of the data array.
double ** rowPtrs
Address of the first element of each rows.
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
unsigned int rowNum
Number of rows in the array.
unsigned int dsize
Current array size (rowNum * colNum)
unsigned int size() const
Return the number of elements of the 2D array.
Implementation of column vector and the associated operations.
error that can be emited by ViSP classes.
@ dimensionError
Bad dimension.
Implementation of an homogeneous matrix and operations on such kind of matrices.
void extract(vpRotationMatrix &R) const
Implementation of a matrix and operations on matrices.
Implementation of a pose vector and operations on poses.
Implementation of row vector and the associated operations.
Class that consider the case of a translation vector.
void set(double tx, double ty, double tz)
vpTranslationVector & operator=(const vpColVector &tv)
static vpTranslationVector mean(const std::vector< vpHomogeneousMatrix > &vec_M)
vp_deprecated double euclideanNorm() const
vpTranslationVector operator/(double x) const
vpTranslationVector & operator/=(double x)
vpTranslationVector & operator*=(double x)
vpMatrix operator*(const vpRowVector &v) const
double frobeniusNorm() const
vpTranslationVector operator-() const
vpTranslationVector operator+(const vpTranslationVector &tv) const
vpTranslationVector & operator<<(double val)
vpTranslationVector & operator,(double val)
static vpTranslationVector cross(const vpTranslationVector &a, const vpTranslationVector &b)
vpTranslationVector buildFrom(double tx, double ty, double tz)
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true)