43#include <visp3/core/vpConfig.h>
45#ifdef VISP_HAVE_NLOHMANN_JSON
46#include VISP_NLOHMANN_JSON(json.hpp)
56#include <visp3/core/vpArray2D.h>
57#include <visp3/core/vpMath.h>
58#include <visp3/core/vpPoseVector.h>
59#include <visp3/core/vpRotationVector.h>
60#include <visp3/core/vpRowVector.h>
265 VP_EXPLICIT
vpColVector(
const std::vector<double> &v);
270 VP_EXPLICIT
vpColVector(
const std::vector<float> &v);
272#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
279#if ((__cplusplus >= 201103L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201103L)))
282 std::copy(list.begin(), list.end(),
data);
298 if (
data !=
nullptr) {
346 std::ostream &cppPrint(std::ostream &os,
const std::string &matrixName =
"A",
bool octet =
false)
const;
378 std::ostream &csvPrint(std::ostream &os)
const;
388 double d2r = M_PI / 180.0;
415 "Cannot extract a (%dx1) column vector from a (%dx1) "
416 "column vector starting at index %d",
433 double frobeniusNorm()
const;
454 double infinityNorm()
const;
496 void init(
const vpColVector &v,
unsigned int r,
unsigned int nrows);
567 std::ostream &maplePrint(std::ostream &os)
const;
611 std::ostream &matlabPrint(std::ostream &os)
const;
695#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
1061 int print(std::ostream &s,
unsigned int length,
char const *intro =
nullptr)
const;
1071 double r2d = 180.0 / M_PI;
1137 void reshape(
vpMatrix &M,
const unsigned int &nrows,
const unsigned int &ncols);
1159 void resize(
unsigned int i,
bool flagNullify =
true)
1175 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify)
1179 "Cannot resize a column vector to a (%dx%d) "
1180 "dimension vector that has more than one column",
1201 void stack(
double d);
1237 double sumSquare()
const;
1248 std::vector<double> toStdVector()
const;
1437 static double stdev(
const vpColVector &v,
bool useBesselCorrection =
false);
1439#ifdef VISP_HAVE_NLOHMANN_JSON
1457#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
1514 return vpColVector(*
this, first_row - 1, last_row - first_row + 1);
1548 VP_DEPRECATED
void insert(
const vpColVector &v,
unsigned int r,
unsigned int c = 0);
1559 VP_DEPRECATED
double euclideanNorm()
const;
1568#ifndef DOXYGEN_SHOULD_SKIP_THIS
1574#ifdef VISP_HAVE_NLOHMANN_JSON
1579 j[
"type"] =
"vpColVector";
1586 if (v.getCols() != 1) {
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)
friend void to_json(nlohmann::json &j, const vpArray2D< T > &array)
unsigned int size() const
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
friend void from_json(const nlohmann::json &j, vpArray2D< T > &array)
void reshape(unsigned int nrows, unsigned int ncols)
bool operator==(const vpArray2D< Type > &A) const
Implementation of column vector and the associated operations.
const double & operator[](unsigned int n) const
vpColVector extract(unsigned int r, unsigned int colsize) const
vpColVector(unsigned int n, double val)
VP_EXPLICIT vpColVector(unsigned int n)
static VP_DEPRECATED vpColVector stackMatrices(const vpColVector &A, const vpColVector &B)
VP_DEPRECATED void stackMatrices(const vpColVector &r)
double & operator[](unsigned int n)
vpColVector(const vpColVector &v)
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify)
static vpColVector crossProd(const vpColVector &a, const vpColVector &b)
VP_DEPRECATED vpColVector rows(unsigned int first_row, unsigned int last_row) const
static VP_DEPRECATED void stackMatrices(const vpColVector &A, const vpColVector &B, vpColVector &C)
vpColVector(const std::initializer_list< double > &list)
static vpColVector cross(const vpColVector &a, const vpColVector &b)
VP_DEPRECATED void init()
void resize(unsigned int i, bool flagNullify=true)
error that can be emitted by ViSP classes.
@ badValue
Used to indicate that a value is not in the allowed range.
Implementation of a matrix and operations on matrices.
vpMatrix operator*(const vpMatrix &B) const
Implementation of a pose vector and operations on poses.
Implementation of a generic rotation vector.
Implementation of row vector and the associated operations.
Class that consider the case of a translation vector.