34#ifndef VP_ROW_VECTOR_H
35#define VP_ROW_VECTOR_H
39#include <visp3/core/vpConfig.h>
40#include <visp3/core/vpArray2D.h>
41#include <visp3/core/vpColVector.h>
42#include <visp3/core/vpMath.h>
43#include <visp3/core/vpMatrix.h>
139 VP_EXPLICIT
vpRowVector(
const std::vector<double> &v);
140 VP_EXPLICIT
vpRowVector(
const std::vector<float> &v);
141#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
157 if (
data !=
nullptr) {
171 std::ostream &cppPrint(std::ostream &os,
const std::string &matrixName =
"A",
bool octet =
false)
const;
172 std::ostream &csvPrint(std::ostream &os)
const;
180 double d2r = M_PI / 180.0;
206 "Cannot extract a (1x%d) row vector from a (1x%d) "
207 "row vector starting at index %d",
214 double frobeniusNorm()
const;
225 void init(
const vpRowVector &v,
unsigned int c,
unsigned int ncols);
228 std::ostream &maplePrint(std::ostream &os)
const;
229 std::ostream &matlabPrint(std::ostream &os)
const;
245#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
272 int print(std::ostream &s,
unsigned int length,
char const *intro =
nullptr)
const;
279 double r2d = 180.0 / M_PI;
284 void reshape(
vpMatrix &M,
const unsigned int &nrows,
const unsigned int &ncols);
304 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify)
308 "Cannot resize a row vector to a (%dx%d) dimension "
309 "vector that has more than one row",
315 void stack(
double d);
319 double sumSquare()
const;
321 std::vector<double> toStdVector()
const;
329 static double stdev(
const vpRowVector &v,
bool useBesselCorrection =
false);
331#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
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)
static vpArray2D< Type > view(const vpArray2D< Type > &A)
Creates a view of the Matrix A. A view shares the same underlying memory as the original array....
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 > hadamard(const vpArray2D< Type > &m) const
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.
Implementation of a matrix and operations on matrices.
Implementation of row vector and the associated operations.
vpRowVector(const vpRowVector &v)
vpRowVector(unsigned int n, double val)
Construct a row vector of size n. Each element is set to val.
VP_DEPRECATED double euclideanNorm() const
void resize(unsigned int i, bool flagNullify=true)
VP_DEPRECATED void setIdentity(const double &val=1.0)
vpRowVector()
Basic constructor that creates an empty 0-size row vector.
static VP_DEPRECATED void stackMatrices(const vpRowVector &A, const vpRowVector &B, vpRowVector &C)
VP_DEPRECATED void stackMatrices(const vpRowVector &r)
VP_EXPLICIT vpRowVector(const std::initializer_list< double > &list)
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify)
VP_EXPLICIT vpRowVector(unsigned int n)
const double & operator[](unsigned int n) const
Operator that allows to get the value of an element : x = v[i].
double & operator[](unsigned int n)
Operator that allows to set a value of an element : v[i] = x.
VP_DEPRECATED void init()
vpRowVector extract(unsigned int c, unsigned int rowsize) const
static VP_DEPRECATED vpRowVector stackMatrices(const vpRowVector &A, const vpRowVector &B)