![]() |
Visual Servoing Platform
version 3.6.1 under development (2025-02-18)
|
#include <visp3/core/vpSubRowVector.h>
Public Member Functions | |
vpSubRowVector () | |
vpSubRowVector (vpRowVector &v, const unsigned int &offset, const unsigned int &ncols) | |
virtual | ~vpSubRowVector () VP_OVERRIDE |
void | checkParentStatus () const |
void | init (vpRowVector &v, const unsigned int &offset, const unsigned int &ncols) |
vpSubRowVector & | operator= (const vpSubRowVector &B) |
vpSubRowVector & | operator= (const vpRowVector &B) |
vpSubRowVector & | operator= (const vpMatrix &B) |
vpSubRowVector & | operator= (const double &x) |
void | clear () |
std::ostream & | cppPrint (std::ostream &os, const std::string &matrixName="A", bool octet=false) const |
std::ostream & | csvPrint (std::ostream &os) const |
void | deg2rad () |
vpRowVector | extract (unsigned int c, unsigned int rowsize) const |
double | frobeniusNorm () const |
vpRowVector | hadamard (const vpRowVector &v) const |
void | init (const vpRowVector &v, unsigned int c, unsigned int ncols) |
void | insert (unsigned int i, const vpRowVector &v) |
std::ostream & | maplePrint (std::ostream &os) const |
std::ostream & | matlabPrint (std::ostream &os) const |
vpRowVector & | normalize () |
vpRowVector & | normalize (vpRowVector &x) const |
double & | operator[] (unsigned int n) |
const double & | operator[] (unsigned int n) const |
bool | operator== (const vpRowVector &v) const |
bool | operator!= (const vpRowVector &v) const |
double | operator* (const vpColVector &x) const |
vpRowVector | operator* (const vpMatrix &M) const |
vpRowVector | operator* (double x) const |
vpRowVector & | operator*= (double x) |
vpRowVector | operator/ (double x) const |
vpRowVector & | operator/= (double x) |
vpRowVector | operator+ (const vpRowVector &v) const |
vpRowVector & | operator+= (vpRowVector v) |
vpRowVector | operator- (const vpRowVector &v) const |
vpRowVector | operator- () const |
vpRowVector & | operator-= (vpRowVector v) |
vpRowVector & | operator<< (const vpRowVector &v) |
vpRowVector & | operator<< (double val) |
vpRowVector & | operator, (double val) |
int | print (std::ostream &s, unsigned int length, char const *intro=0) const |
void | rad2deg () |
void | reshape (vpMatrix &M, const unsigned int &nrows, const unsigned int &ncols) |
vpMatrix | reshape (unsigned int nrows, unsigned int ncols) |
void | resize (unsigned int i, bool flagNullify=true) |
void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify) |
void | stack (double d) |
void | stack (const vpRowVector &v) |
double | sum () const |
double | sumSquare () const |
vpColVector | t () const |
std::vector< double > | toStdVector () const |
vpColVector | transpose () const |
void | transpose (vpColVector &v) const |
Inherited functionalities from vpArray2D | |
vpArray2D< double > | hadamard (const vpArray2D< double > &m) const |
void | insert (const vpArray2D< double > &A, unsigned int r, unsigned int c) |
bool | operator== (const vpArray2D< double > &A) const |
bool | operator!= (const vpArray2D< double > &A) const |
void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true) |
unsigned int | getCols () const |
double | getMaxValue () const |
double | getMinValue () const |
unsigned int | getRows () const |
unsigned int | size () const |
Static Public Member Functions | |
static vpRowVector | view (double *data, unsigned int cols) |
static vpArray2D< double > | view (const vpArray2D< double > &A) |
static vpArray2D< double > | view (double *data, unsigned int numRows, unsigned int numCols) |
static void | view (vpArray2D< double > &v, double *data, unsigned int numRows, unsigned int numCols) |
static vpRowVector | stack (const vpRowVector &A, const vpRowVector &B) |
static void | stack (const vpRowVector &A, const vpRowVector &B, vpRowVector &C) |
static double | mean (const vpRowVector &v) |
static double | median (const vpRowVector &v) |
static double | stdev (const vpRowVector &v, bool useBesselCorrection=false) |
Public Attributes | |
double * | data |
Protected Attributes | |
unsigned int | m_pColNum |
vpRowVector * | m_parent |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const vpArray2D< double > &A) const |
bool | operator== (const vpArray2D< float > &A) const |
enum | vpGEMMmethod |
void | vpGEMM (const vpArray2D< double > &A, const vpArray2D< double > &B, const double &alpha, const vpArray2D< double > &C, const double &beta, vpArray2D< double > &D, const unsigned int &ops=0) |
Inherited I/O from vpArray2D with Static Public Member Functions | |
unsigned int | rowNum |
unsigned int | colNum |
double ** | rowPtrs |
unsigned int | dsize |
bool | isMemoryOwner |
bool | isRowPtrsOwner |
vpArray2D< double > | insert (const vpArray2D< double > &A, const vpArray2D< double > &B, unsigned int r, unsigned int c) |
static bool | load (const std::string &filename, vpArray2D< double > &A, bool binary=false, char *header=nullptr) |
static bool | loadYAML (const std::string &filename, vpArray2D< double > &A, char *header=nullptr) |
static bool | save (const std::string &filename, const vpArray2D< double > &A, bool binary=false, const char *header="") |
static bool | saveYAML (const std::string &filename, const vpArray2D< double > &A, const char *header="") |
static vpArray2D< double > | conv2 (const vpArray2D< double > &M, const vpArray2D< double > &kernel, const std::string &mode) |
static void | conv2 (const vpArray2D< double > &M, const vpArray2D< double > &kernel, vpArray2D< double > &res, const std::string &mode) |
static void | insert (const vpArray2D< double > &A, const vpArray2D< double > &B, vpArray2D< double > &C, unsigned int r, unsigned int c) |
This class provides a mask on a vpRowVector. It has internally a pointer to the parent vpRowVector. All properties of vpRowVector are available with a vpSubRowVector.
Definition at line 57 of file vpSubRowVector.h.
BEGIN_VISP_NAMESPACE vpSubRowVector::vpSubRowVector | ( | ) |
Default constructor that creates an empty vector.
Definition at line 41 of file vpSubRowVector.cpp.
vpSubRowVector::vpSubRowVector | ( | vpRowVector & | v, |
const unsigned int & | offset, | ||
const unsigned int & | ncols | ||
) |
Construct a sub-row vector from a parent row vector.
v | : parent row vector. |
offset | : offset where the sub-row vector starts in the parent row vector. |
ncols | : size of the sub-row vector. |
Definition at line 49 of file vpSubRowVector.cpp.
References init().
|
virtual |
Destructor that set the pointer to the parent row vector to nullptr.
Definition at line 97 of file vpSubRowVector.cpp.
References vpArray2D< double >::data.
void vpSubRowVector::checkParentStatus | ( | ) | const |
This method can be used to detect if the parent row vector always exits or its size have not changed. If this not the case an exception is thrown.
Definition at line 104 of file vpSubRowVector.cpp.
References vpArray2D< double >::data, vpException::dimensionError, vpException::fatalError, vpArray2D< Type >::getCols(), m_parent, and m_pColNum.
|
inlineinherited |
Removes all elements from the vector (which are destroyed), leaving the container with a size of 0.
Definition at line 152 of file vpRowVector.h.
References vpException::fatalError.
|
staticinherited |
Perform a 2D convolution similar to Matlab conv2 function: .
M | : First matrix. |
kernel | : Second matrix. |
mode | : Convolution mode: "full" (default), "same", "valid". |
Definition at line 1138 of file vpArray2D.h.
|
staticinherited |
Perform a 2D convolution similar to Matlab conv2 function: .
M | : First array. |
kernel | : Second array. |
res | : Result. |
mode | : Convolution mode: "full" (default), "same", "valid". |
Definition at line 1152 of file vpArray2D.h.
|
inherited |
Print to be used as part of a C++ code later.
os | : the stream to be printed in. |
matrixName | : name of the row vector, "A" by default. |
octet | : if false, print using double, if true, print byte per byte each bytes of the double array. |
The following code shows how to use this function:
It produces the following output that could be copy/paste in a C++ code:
Definition at line 1246 of file vpRowVector.cpp.
References vpArray2D< double >::getCols().
|
inherited |
Print/save a row vector in csv format.
The following code
produces log.csv file that contains:
Definition at line 1294 of file vpRowVector.cpp.
References vpArray2D< double >::getCols().
|
inlineinherited |
Convert a column vector containing angles in degrees into radians.
Definition at line 178 of file vpRowVector.h.
|
inlineinherited |
Extract a sub-row vector from a row vector.
c | : Index of the column corresponding to the first element of the vector to extract. |
rowsize | : Size of the vector to extract. |
vpException::fatalError | If the vector to extract is not contained in the original one. |
Definition at line 202 of file vpRowVector.h.
References vpException::fatalError.
|
inherited |
Compute and return the Frobenius norm .
Definition at line 1137 of file vpRowVector.cpp.
References vpRowVector::sumSquare().
|
inlineinherited |
Return the number of columns of the 2D array.
Definition at line 417 of file vpArray2D.h.
|
inherited |
Return the array max value.
Definition at line 419 of file vpArray2D.h.
|
inherited |
Return the array min value.
Definition at line 421 of file vpArray2D.h.
|
inlineinherited |
Return the number of rows of the 2D array.
Definition at line 427 of file vpArray2D.h.
Compute the Hadamard product (element wise matrix multiplication).
m | : Second matrix; |
Definition at line 726 of file vpArray2D.h.
|
inherited |
Compute the Hadamard product (element wise vector multiplication).
v | : Second vector; |
Definition at line 1403 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, vpArray2D< Type >::data, vpException::dimensionError, vpArray2D< double >::dsize, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), vpRowVector::resize(), and vpArray2D< double >::rowNum.
|
inherited |
Initialize the row vector from a part of an input row vector v.
v | : Input row vector used for initialization. |
c | : column index in v that corresponds to the first element of the row vector to construct. |
ncols | : Number of columns of the constructed row vector. |
The sub-vector starting from v[c] element and ending on v[c+ncols-1] element is used to initialize the constructed row vector.
The following code shows how to use this function:
It produces the following output:
Definition at line 1196 of file vpRowVector.cpp.
References vpException::dimensionError, vpArray2D< Type >::getCols(), vpRowVector::resize(), and vpArray2D< double >::rowPtrs.
Referenced by vpRowVector::vpRowVector().
void vpSubRowVector::init | ( | vpRowVector & | v, |
const unsigned int & | offset, | ||
const unsigned int & | ncols | ||
) |
Initialize a sub-row vector from a parent row vector.
v | : parent row vector. |
offset | : offset where the sub-row vector starts in the parent row vector. |
ncols | : size of the sub-row vector. |
Definition at line 61 of file vpSubRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, vpArray2D< Type >::data, vpException::dimensionError, vpArray2D< double >::dsize, vpException::fatalError, vpArray2D< Type >::getCols(), m_parent, m_pColNum, vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.
Referenced by vpSubRowVector().
|
inherited |
Insert array B in array A at the given position.
A | : Main array. |
B | : Array to insert. |
r | : Index of the row where to add the array. |
c | : Index of the column where to add the array. |
Definition at line 1166 of file vpArray2D.h.
|
inlineinherited |
Insert array A at the given position in the current array.
A | : The array to insert. |
r | : The index of the row to begin to insert data. |
c | : The index of the column to begin to insert data. |
Definition at line 580 of file vpArray2D.h.
|
inherited |
Insert a row vector.
i | : Index of the first element to introduce. This index starts from 0. |
v | : Row vector to insert. |
The following example shows how to use this function:
It produces the following output:
Definition at line 784 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< Type >::size().
|
inlinestaticinherited |
Load a matrix from a file.
filename | : Absolute file name. |
A | : Array to be loaded |
binary | : If true the matrix is loaded from a binary file, else from a text file. |
header | : Header of the file is loaded in this parameter. |
Definition at line 754 of file vpArray2D.h.
|
inlinestaticinherited |
Load an array from a YAML-formatted file.
filename | : absolute file name. |
A | : array to be loaded from the file. |
header | : header of the file is loaded in this parameter. |
Definition at line 868 of file vpArray2D.h.
|
inherited |
Print using Maple syntax, to copy/paste in Maple later.
The following code
produces this output:
that could be copy/paste in Maple.
Definition at line 1334 of file vpRowVector.cpp.
References vpArray2D< double >::getCols().
|
inherited |
Print using Matlab syntax, to copy/paste in Matlab later.
The following code
produces this output:
that could be copy/paste in Matlab:
Definition at line 1381 of file vpRowVector.cpp.
References vpArray2D< double >::getCols().
|
staticinherited |
Compute the mean value of all the elements of the vector.
Definition at line 938 of file vpRowVector.cpp.
References vpArray2D< Type >::data, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< Type >::size().
Referenced by vpRowVector::stdev().
|
staticinherited |
Compute the median value of all the elements of the vector.
Definition at line 957 of file vpRowVector.cpp.
References vpArray2D< Type >::colNum, vpArray2D< Type >::data, vpException::dimensionError, vpMath::getMedian(), and vpArray2D< Type >::size().
|
inherited |
Normalise the vector modifying the vector as:
where is an element of the row vector
.
Definition at line 651 of file vpRowVector.cpp.
References vpRowVector::sumSquare().
|
inherited |
Normalize the vector given as input parameter and return the normalized vector:
where is an element of the row vector
.
Definition at line 636 of file vpRowVector.cpp.
References vpRowVector::sumSquare().
|
inherited |
Not equal to comparison operator of a 2D array.
Definition at line 606 of file vpArray2D.h.
|
inherited |
Definition at line 202 of file vpRowVector.cpp.
|
inherited |
Multiply a row vector by a column vector.
x | : Column vector. |
vpException::dimensionError | : If the number of elements of the two vectors is not the same. |
Definition at line 218 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< double >::getCols(), and vpArray2D< Type >::getRows().
|
inherited |
Multiply a row vector by a matrix.
M | : Matrix. |
vpException::dimensionError | If the number of elements of the row vector is not equal to the number of rows of the matrix. |
Definition at line 248 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
|
inherited |
Operator that allows to multiply each element of a row vector by a scalar.
x | : The scalar. |
Definition at line 289 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, and vpArray2D< Type >::data.
|
inherited |
Operator that allows to multiply each element of a row vector by a scalar.
x | : The scalar. |
Definition at line 320 of file vpRowVector.cpp.
References vpArray2D< double >::colNum.
|
inherited |
Operator that allows to add to row vectors that have the same size.
vpException::dimensionError | If the vectors size differ. |
Definition at line 435 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< double >::getCols().
|
inherited |
Operator that allows to add two row vectors that have the same size.
vpException::dimensionError | If the size of the two vectors differ. |
Definition at line 455 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< double >::getCols().
|
inherited |
Definition at line 524 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, and vpRowVector::resize().
|
inherited |
Operator that allows to negate all the row vector elements.
Definition at line 397 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, and vpArray2D< Type >::data.
|
inherited |
Operator that allows to subtract to row vectors that have the same size.
vpException::dimensionError | If the vectors size differ. |
Definition at line 416 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< double >::getCols().
|
inherited |
Operator that allows to subtract two row vectors that have the same size.
vpException::dimensionError | If the size of the two vectors differ. |
Definition at line 473 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< double >::getCols().
|
inherited |
Operator that allows to divide each element of a row vector by a scalar.
x | : The scalar. |
Definition at line 347 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, and vpArray2D< Type >::data.
|
inherited |
Operator that allows to divide each element of a row vector by a scalar.
x | : The scalar. |
Definition at line 379 of file vpRowVector.cpp.
References vpArray2D< double >::colNum.
|
inherited |
Copy operator. Allows operation such as A << v
In row vector A we get:
Definition at line 511 of file vpRowVector.cpp.
|
inherited |
Definition at line 517 of file vpRowVector.cpp.
References vpArray2D< double >::data, and vpRowVector::resize().
vpSubRowVector & vpSubRowVector::operator= | ( | const double & | x | ) |
Set all the elements of the sub-row vector to x.
x | : a scalar value. |
Definition at line 178 of file vpSubRowVector.cpp.
References vpArray2D< double >::data, and vpArray2D< double >::rowNum.
vpSubRowVector & vpSubRowVector::operator= | ( | const vpMatrix & | B | ) |
Allow to initialize a sub-row vector from a matrix using operation A = B. Notice that the sub-row vector is not resized to the dimension of B.
B | : a matrix of size 1-by-n. |
Definition at line 161 of file vpSubRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, vpException::dimensionError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and vpArray2D< double >::rowNum.
vpSubRowVector & vpSubRowVector::operator= | ( | const vpRowVector & | B | ) |
Allow to initialize a sub-row vector from a row vector using operation A = B. Notice that the sub-row vector is not resized to the dimension of B.
B | : a row vector. |
Definition at line 141 of file vpSubRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< double >::rowNum.
vpSubRowVector & vpSubRowVector::operator= | ( | const vpSubRowVector & | B | ) |
Allow to initialize a sub-row vector from an other one using operation A = B. Notice that the sub-row vector is not resized to the dimension of B.
B | : a sub-row vector. |
Definition at line 120 of file vpSubRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, vpException::dimensionError, vpArray2D< Type >::getCols(), m_parent, m_pColNum, and vpArray2D< double >::rowNum.
Equal to comparison operator of a 2D array.
Definition at line 602 of file vpArray2D.h.
|
inherited |
Comparison operator.
Definition at line 187 of file vpRowVector.cpp.
References vpArray2D< Type >::colNum, vpArray2D< double >::colNum, vpArray2D< Type >::data, vpArray2D< double >::data, vpMath::equal(), vpArray2D< Type >::rowNum, and vpArray2D< double >::rowNum.
|
inlineinherited |
Operator that allows to set a value of an element : v[i] = x.
Definition at line 235 of file vpRowVector.h.
|
inlineinherited |
Operator that allows to get the value of an element : x = v[i].
Definition at line 237 of file vpRowVector.h.
|
inherited |
Pretty print a row vector. The data are tabulated. The common widths before and after the decimal point are set with respect to the parameter maxlen.
s | Stream used for the printing. |
length | The suggested width of each row vector element. The actual width grows in order to accommodate the whole integral part, and shrinks if the whole extent is not needed for all the numbers. |
intro | The introduction which is printed before the vector. Can be set to zero (or omitted), in which case the introduction is not printed. |
Definition at line 1011 of file vpRowVector.cpp.
References vpArray2D< double >::getCols(), and vpMath::maximum().
|
inlineinherited |
Convert a column vector containing angles in radians into degrees.
Definition at line 277 of file vpRowVector.h.
|
inherited |
Reshape the row vector in a matrix.
nrows | : number of rows of the matrix. |
ncols | : number of columns of the matrix. |
vpException::dimensionError | If the matrix and the row vector have not the same size. |
Definition at line 673 of file vpRowVector.cpp.
References vpRowVector::reshape().
|
inherited |
Reshape the row vector in a matrix.
M | : the reshaped matrix. |
nrows | : number of rows of the matrix. |
ncols | : number of columns of the matrix. |
vpException::dimensionError | If the matrix and the row vector have not the same size. |
The following example shows how to use this method.
If you run the previous example, you get:
Definition at line 727 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, vpException::dimensionError, vpArray2D< double >::dsize, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and vpArray2D< Type >::resize().
Referenced by vpRowVector::reshape().
|
inlineinherited |
Modify the size of the row vector.
i | : Size of the vector. This value corresponds to the vector number of columns. |
flagNullify | : If true, set the data to zero. |
Definition at line 292 of file vpRowVector.h.
References vpArray2D< Type >::resize().
Referenced by vpImageTools::columnMean(), VISP_NAMESPACE_NAME::eigen2visp(), vpRowVector::hadamard(), vpRowVector::init(), vpRowVector::operator,(), vpRowVector::operator<<(), vpRowVector::operator=(), vpRowVector::stack(), vpMatrix::stackRows(), vpTemplateTrackerSSD::vpTemplateTrackerSSD(), and vpTemplateTrackerZNCC::vpTemplateTrackerZNCC().
|
inlineinherited |
Resize the row vector to a ncols-dimension vector. This function can only be used with nrows = 1.
nrows | : Vector number of rows. This value should be set to 1. |
ncols | : Vector number of columns. This value corresponds to the size of the vector. |
flagNullify | : If true, set the data to zero. |
vpException::fatalError | When nrows is not equal to 1. |
Definition at line 304 of file vpRowVector.h.
References vpException::fatalError, and vpArray2D< Type >::resize().
|
inlineinherited |
Set the size of the array and initialize all the values to zero.
nrows | : number of rows. |
ncols | : number of column. |
flagNullify | : if true, then the array is re-initialized to 0 after resize. If false, the initial values from the common part of the array (common part between old and new version of the array) are kept. Default value is true. |
recopy_ | : if true, will perform an explicit recopy of the old data. |
Definition at line 442 of file vpArray2D.h.
|
inlinestaticinherited |
Save a matrix to a file.
filename | : Absolute file name. |
A | : Array to be saved. |
binary | : If true the matrix is saved in a binary file, else a text file. |
header | : Optional line that will be saved at the beginning of the file. |
Warning : If you save the matrix as in a text file the precision is less than if you save it in a binary file.
Definition at line 959 of file vpArray2D.h.
|
inlinestaticinherited |
Save an array in a YAML-formatted file.
filename | : absolute file name. |
A | : array to be saved in the file. |
header | : optional lines that will be saved at the beginning of the file. Should be YAML-formatted and will adapt to the indentation if any. |
Here is an example of outputs.
Content of matrix.yml:
Content of matrixIndent.yml:
Definition at line 1057 of file vpArray2D.h.
|
inlineinherited |
Return the number of elements of the 2D array.
Definition at line 429 of file vpArray2D.h.
|
staticinherited |
Stack row vectors.
A | : Initial vector. |
B | : Vector to stack at the end of A. |
Definition at line 876 of file vpRowVector.cpp.
References vpRowVector::stack().
|
staticinherited |
Stack row vectors.
A | : Initial vector. |
B | : Vector to stack at the end of A. |
C | : Resulting stacked vector ![]() |
Definition at line 903 of file vpRowVector.cpp.
References vpArray2D< Type >::getCols(), and vpRowVector::resize().
|
inherited |
Stack row vectors.
v | : Vector to stack to the existing one. |
Definition at line 854 of file vpRowVector.cpp.
References vpRowVector::stack().
|
inherited |
Stack row vector with a new element at the end of the vector.
d | : Element to stack to the existing one. |
Definition at line 829 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, and vpRowVector::resize().
Referenced by vpRowVector::stack().
|
staticinherited |
Compute the standard deviation value of all the elements of the vector.
Definition at line 971 of file vpRowVector.cpp.
References vpArray2D< Type >::data, vpException::dimensionError, vpRowVector::mean(), and vpArray2D< Type >::size().
|
inherited |
Return the sum of all the elements of the row vector v(n).
Definition at line 1103 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, and vpArray2D< double >::rowPtrs.
|
inherited |
Return the sum square of all the elements of the row vector v(n).
Definition at line 1120 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, and vpArray2D< double >::rowPtrs.
Referenced by vpRowVector::frobeniusNorm(), and vpRowVector::normalize().
|
inherited |
Transpose the row vector. The resulting vector becomes a column vector.
Definition at line 534 of file vpRowVector.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::data, and vpArray2D< Type >::data.
Referenced by vpRowVector::transpose().
|
inherited |
Converts the vpRowVector to a std::vector.
Definition at line 802 of file vpRowVector.cpp.
References vpArray2D< double >::data, and vpArray2D< double >::size().
|
inherited |
Transpose the row vector. The resulting vector becomes a column vector.
Definition at line 545 of file vpRowVector.cpp.
References vpRowVector::t().
Referenced by vpUKSigmaDrawerMerwe::drawSigmaPoints().
|
inherited |
Transpose the row vector. The resulting vector v becomes a column vector.
Definition at line 550 of file vpRowVector.cpp.
References vpRowVector::t().
|
inlinestaticinherited |
Creates a view of the Matrix A. A view shares the same underlying memory as the original array. It can be written into, modifying the original data. However, the array cannot be resized.
When you use this method, it is your responsibility to ensure that the lifespan of the view does not exceed the lifespan of the original array.
A | the array to view |
Definition at line 323 of file vpArray2D.h.
|
staticinherited |
Create a row vector view of a raw data array. The view can modify the contents of the raw data array, but may not resize it and does not own it : the memory is not released by the vector and it should be freed by the user after the view is released.
data | the raw data |
cols | Number of columns |
Definition at line 67 of file vpRowVector.cpp.
References vpArray2D< double >::data, and vpArray2D< Type >::view().
|
inlinestaticinherited |
Create an array view of a raw data pointer. This data is not owned by the resulting array and should be freed after the array is destroyed (not before)
data | Pointer to the raw data |
numRows | Number of rows |
numCols | Number of columns |
Definition at line 345 of file vpArray2D.h.
|
inlinestaticinherited |
Create an array view of a raw data pointer. After this function has been called, the array data
can be modified through the view v
. This data is not owned by the resulting array and should be freed after the array is destroyed (not before).
v | The resulting view array |
data | Pointer to the raw data |
numRows | Number of rows |
numCols | Number of columns |
Definition at line 362 of file vpArray2D.h.
|
related |
Insert array B in array A at the given position.
A | : Main array. |
B | : Array to insert. |
C | : Result array. |
r | : Index of the row where to insert array B. |
c | : Index of the column where to insert array B. |
Definition at line 1181 of file vpArray2D.h.
|
related |
Definition at line 1403 of file vpArray2D.h.
|
related |
Definition at line 1422 of file vpArray2D.h.
|
related |
This function performs generalized matrix multiplication: D = alpha*op(A)*op(B) + beta*op(C), where op(X) is X or X^T. Operation on A, B and C matrices is described by enumeration vpGEMMmethod().
For example, to compute D = alpha*A^T*B^T+beta*C we need to call :
If C is not used, vpGEMM must be called using an empty array null. Thus to compute D = alpha*A^T*B, we have to call:
vpException::incorrectMatrixSizeError | if the sizes of the matrices do not allow the operations. |
A | : An array that could be a vpMatrix. |
B | : An array that could be a vpMatrix. |
alpha | : A scalar. |
C | : An array that could be a vpMatrix. |
beta | : A scalar. |
D | : The resulting array that could be a vpMatrix. |
ops | : A scalar describing operation applied on the matrices. Possible values are the one defined in vpGEMMmethod(): VP_GEMM_A_T, VP_GEMM_B_T, VP_GEMM_C_T. |
|
related |
Enumeration of the operations applied on matrices in vpGEMM() function.
Operations are :
|
protectedinherited |
Number of columns in the array.
Definition at line 1188 of file vpArray2D.h.
|
inherited |
Address of the first element of the data array.
Definition at line 148 of file vpArray2D.h.
|
protectedinherited |
Current array size (rowNum * colNum)
Definition at line 1192 of file vpArray2D.h.
|
protectedinherited |
Whether this array owns the memory it points to.
Definition at line 1194 of file vpArray2D.h.
|
protectedinherited |
Whether this array owns the row pointers.
Definition at line 1196 of file vpArray2D.h.
|
protected |
Parent vpColVector.
Definition at line 78 of file vpSubRowVector.h.
Referenced by checkParentStatus(), init(), and operator=().
|
protected |
Number of row of parent vpColVector at initialization.
Definition at line 76 of file vpSubRowVector.h.
Referenced by checkParentStatus(), init(), and operator=().
|
protectedinherited |
Number of rows in the array.
Definition at line 1186 of file vpArray2D.h.
|
protectedinherited |
Address of the first element of each rows.
Definition at line 1190 of file vpArray2D.h.