![]() |
Visual Servoing Platform
version 3.6.1 under development (2025-02-18)
|
#include <visp3/core/vpRotationMatrix.h>
Public Member Functions | |
vpRotationMatrix () | |
vpRotationMatrix (const vpRotationMatrix &R) | |
VP_EXPLICIT | vpRotationMatrix (const vpHomogeneousMatrix &M) |
VP_EXPLICIT | vpRotationMatrix (const vpThetaUVector &r) |
VP_EXPLICIT | vpRotationMatrix (const vpPoseVector &p) |
VP_EXPLICIT | vpRotationMatrix (const vpRzyzVector &r) |
VP_EXPLICIT | vpRotationMatrix (const vpRxyzVector &r) |
VP_EXPLICIT | vpRotationMatrix (const vpRzyxVector &r) |
VP_EXPLICIT | vpRotationMatrix (const vpQuaternionVector &q) |
VP_EXPLICIT | vpRotationMatrix (const vpMatrix &R) |
vpRotationMatrix (double tux, double tuy, double tuz) | |
VP_EXPLICIT | vpRotationMatrix (const std::initializer_list< double > &list) |
vpRotationMatrix & | buildFrom (const vpHomogeneousMatrix &M) |
vpRotationMatrix & | buildFrom (const vpThetaUVector &v) |
vpRotationMatrix & | buildFrom (const vpPoseVector &p) |
vpRotationMatrix & | buildFrom (const vpRzyzVector &v) |
vpRotationMatrix & | buildFrom (const vpRxyzVector &v) |
vpRotationMatrix & | buildFrom (const vpRzyxVector &v) |
vpRotationMatrix & | buildFrom (const vpQuaternionVector &q) |
vpRotationMatrix & | buildFrom (const double &tux, const double &tuy, const double &tuz) |
void | eye () |
vpColVector | getCol (unsigned int j) const |
vpThetaUVector | getThetaUVector () |
vpRotationMatrix | inverse () const |
void | inverse (vpRotationMatrix &R) const |
bool | isARotationMatrix (double threshold=1e-6) const |
vpRotationMatrix & | operator= (const vpRotationMatrix &R) |
vpRotationMatrix & | operator= (const vpMatrix &M) |
vpRotationMatrix & | operator= (const std::initializer_list< double > &list) |
vpTranslationVector | operator* (const vpTranslationVector &tv) const |
vpRotationMatrix | operator* (const vpRotationMatrix &R) const |
vpHomogeneousMatrix | operator* (const vpHomogeneousMatrix &M) const |
vpMatrix | operator* (const vpMatrix &M) const |
vpColVector | operator* (const vpColVector &v) const |
vpRotationMatrix | operator* (double x) const |
vpRotationMatrix & | operator*= (double x) |
vpRotationMatrix & | operator<< (double val) |
vpRotationMatrix & | operator, (double val) |
void | orthogonalize () |
void | printVector () |
void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true) |
vpRotationMatrix | t () const |
Inherited functionalities from vpArray2D | |
unsigned int | getCols () const |
double | getMaxValue () const |
double | getMinValue () const |
unsigned int | getRows () const |
unsigned int | size () const |
void | resize (unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true) |
void | reshape (unsigned int nrows, unsigned int ncols) |
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 |
double * | operator[] (unsigned int i) |
double * | operator[] (unsigned int i) const |
vpArray2D< double > | hadamard (const vpArray2D< double > &m) const |
Static Public Member Functions | |
static vpRotationMatrix | mean (const std::vector< vpHomogeneousMatrix > &vec_M) |
static vpRotationMatrix | mean (const std::vector< vpRotationMatrix > &vec_R) |
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) |
Public Attributes | |
double * | data |
Protected Attributes | |
unsigned int | m_index |
Related Functions | |
(Note that these are not member functions.) | |
enum | vpGEMMmethod |
bool | operator== (const vpArray2D< double > &A) const |
bool | operator== (const vpArray2D< float > &A) const |
bool | operator!= (const vpArray2D< double > &A) const |
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) |
Implementation of a rotation matrix and operations on such kind of matrices.
The vpRotationMatrix considers the particular case of a rotation matrix.
The vpRotationMatrix class is derived from vpArray2D<double>.
The code below shows how to create a rotation matrix, set the element values and access them:
Once build, this previous code produces the following output:
You can also use operator<< to initialize a rotation matrix as previously:
If ViSP is build with c++11 enabled, you can do the same using:
Definition at line 129 of file vpRotationMatrix.h.
vpRotationMatrix::vpRotationMatrix | ( | ) |
Default constructor that initialise a 3-by-3 rotation matrix to identity.
Definition at line 509 of file vpRotationMatrix.cpp.
References eye().
vpRotationMatrix::vpRotationMatrix | ( | const vpRotationMatrix & | M | ) |
Copy constructor that construct a 3-by-3 rotation matrix from another rotation matrix.
Definition at line 515 of file vpRotationMatrix.cpp.
vpRotationMatrix::vpRotationMatrix | ( | const vpHomogeneousMatrix & | M | ) |
Construct a 3-by-3 rotation matrix from an homogeneous matrix.
Definition at line 520 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix::vpRotationMatrix | ( | const vpThetaUVector & | tu | ) |
Construct a 3-by-3 rotation matrix from angle representation.
Definition at line 526 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix::vpRotationMatrix | ( | const vpPoseVector & | p | ) |
Construct a 3-by-3 rotation matrix from a pose vector.
Definition at line 531 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix::vpRotationMatrix | ( | const vpRzyzVector & | euler | ) |
Construct a 3-by-3 rotation matrix from Euler angle representation.
Definition at line 537 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix::vpRotationMatrix | ( | const vpRxyzVector & | Rxyz | ) |
Construct a 3-by-3 rotation matrix from Euler angle representation.
Definition at line 546 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix::vpRotationMatrix | ( | const vpRzyxVector & | Rzyx | ) |
Construct a 3-by-3 rotation matrix from Euler angle representation.
Definition at line 552 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix::vpRotationMatrix | ( | const vpQuaternionVector & | q | ) |
Construct a 3-by-3 rotation matrix from quaternion angle representation.
Definition at line 571 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix::vpRotationMatrix | ( | const vpMatrix & | R | ) |
Construct a 3-by-3 rotation matrix from a matrix that contains values corresponding to a rotation matrix.
Definition at line 557 of file vpRotationMatrix.cpp.
vpRotationMatrix::vpRotationMatrix | ( | double | tux, |
double | tuy, | ||
double | tuz | ||
) |
Construct a 3-by-3 rotation matrix from angle representation.
Definition at line 563 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix::vpRotationMatrix | ( | const std::initializer_list< double > & | list | ) |
Construct a rotation matrix from a list of 9 double values.
list | : List of double. The following code shows how to use this constructor to initialize a rotation matrix: #include <visp3/core/vpRotationMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
vpRotationMatrix R{ 0, 0, -1, 0, -1, 0, -1, 0, 0 };
std::cout << "R:\n" << R << std::endl;
}
R:
0 0 -1
0 -1 0
-1 0 0
|
Definition at line 599 of file vpRotationMatrix.cpp.
References vpException::fatalError, isARotationMatrix(), and orthogonalize().
vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const double & | tux, |
const double & | tuy, | ||
const double & | tuz | ||
) |
Construct a 3-by-3 rotation matrix from angle representation.
Definition at line 864 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpHomogeneousMatrix & | M | ) |
Build a rotation matrix from an homogeneous matrix.
Definition at line 733 of file vpRotationMatrix.cpp.
Referenced by buildFrom(), vpRzyxVector::buildFrom(), vpRzyzVector::buildFrom(), vpRxyzVector::buildFrom(), vpExponentialMap::direct(), vpPoseVector::extract(), vpRobotAfma6::setPosition(), and vpRotationMatrix().
vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpPoseVector & | p | ) |
Build a rotation matrix from a pose vector.
Definition at line 750 of file vpRotationMatrix.cpp.
References buildFrom().
vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpQuaternionVector & | q | ) |
Construct a 3-by-3 rotation matrix from a quaternion representation.
Definition at line 874 of file vpRotationMatrix.cpp.
References vpQuaternionVector::w(), vpQuaternionVector::x(), vpQuaternionVector::y(), and vpQuaternionVector::z().
vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpRxyzVector & | v | ) |
Transform a vector representing the Rxyz angle into a rotation matrix. Rxyz( ) = Rot(
) Rot(
) Rot(
)
Definition at line 798 of file vpRotationMatrix.cpp.
vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpRzyxVector & | v | ) |
Transform a vector representing the Rzyx angle into a rotation matrix. Rxyz( ) = Rot(
) Rot(
)Rot(
)
Definition at line 831 of file vpRotationMatrix.cpp.
vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpRzyzVector & | v | ) |
Transform a vector representing the Euler angle into a rotation matrix. Rzyz( ) = Rot(
) Rot(
) Rot(
)
Definition at line 763 of file vpRotationMatrix.cpp.
vpRotationMatrix & vpRotationMatrix::buildFrom | ( | const vpThetaUVector & | v | ) |
Transform a angle representation into a rotation matrix.
The rotation is computed using :
Definition at line 696 of file vpRotationMatrix.cpp.
References vpMath::mcosc(), and vpMath::sinc().
|
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.
void vpRotationMatrix::eye | ( | ) |
Initialize the rotation matrix as identity.
Definition at line 59 of file vpRotationMatrix.cpp.
Referenced by vpRotationMatrix().
vpColVector vpRotationMatrix::getCol | ( | unsigned int | j | ) | const |
Extract a column vector from a rotation matrix.
j | : Index of the column to extract. If j=0, the first column is extracted. |
The following example shows how to use this function:
It produces the following output:
Definition at line 939 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpArray2D< double >::getCols(), and vpArray2D< double >::getRows().
|
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.
vpThetaUVector vpRotationMatrix::getThetaUVector | ( | ) |
Return the vector that corresponds to the rotation matrix.
Definition at line 901 of file vpRotationMatrix.cpp.
References vpThetaUVector::buildFrom().
Referenced by vpRobotBebop2::setPosition().
Compute the Hadamard product (element wise matrix multiplication).
m | : Second matrix; |
Definition at line 726 of file vpArray2D.h.
|
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.
vpRotationMatrix vpRotationMatrix::inverse | ( | ) | const |
Return the rotation matrix inverse which is also the transpose of the rotation matrix.
Definition at line 641 of file vpRotationMatrix.cpp.
References t().
Referenced by vpViper::get_eJe(), and inverse().
void vpRotationMatrix::inverse | ( | vpRotationMatrix & | R | ) | const |
Inverse the rotation matrix.
R | (output): Inverted rotation matrix. |
Definition at line 669 of file vpRotationMatrix.cpp.
References inverse().
bool vpRotationMatrix::isARotationMatrix | ( | double | threshold = 1e-6 | ) | const |
Test if the rotation matrix is really a rotation matrix.
Definition at line 461 of file vpRotationMatrix.cpp.
References vpArray2D< double >::getCols(), vpArray2D< double >::getRows(), vpMath::sqr(), and t().
Referenced by vpHomogeneousMatrix::isAnHomogeneousMatrix(), operator=(), and vpRotationMatrix().
|
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.
|
static |
Compute the Euclidean mean of the rotation matrices extracted from a vector of homogeneous matrices following Moakher's method (SIAM 2002).
[in] | vec_M | : Set of homogeneous matrices. |
Definition at line 961 of file vpRotationMatrix.cpp.
References vpMatrix::pseudoInverse(), vpArray2D< Type >::size(), and vpMatrix::t().
|
static |
Compute the Euclidean mean of the rotation matrices following Moakher's method (SIAM 2002).
[in] | vec_R | : Set of rotation matrices. |
Definition at line 1004 of file vpRotationMatrix.cpp.
References vpMatrix::pseudoInverse(), vpArray2D< Type >::size(), and vpMatrix::t().
|
inherited |
Not equal to comparison operator of a 2D array.
Definition at line 606 of file vpArray2D.h.
vpColVector vpRotationMatrix::operator* | ( | const vpColVector & | v | ) | const |
Operator that allows to multiply a rotation matrix by a 3 dimension column vector.
v | : Three dimension column vector. |
vpException::dimensionError | If the column vector v is not a 3 dimension vector. |
The code below shows how to use this operator.
Definition at line 378 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpException::dimensionError, vpArray2D< Type >::getRows(), vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.
vpHomogeneousMatrix vpRotationMatrix::operator* | ( | const vpHomogeneousMatrix & | M | ) | const |
Operator that allows to multiply a rotation matrix by a homogeneous matrix.
[in] | M | : Homogeneous matrix. |
M
.The following snippet shows how to use this method:
Definition at line 340 of file vpRotationMatrix.cpp.
References vpHomogeneousMatrix::getRotationMatrix(), and vpHomogeneousMatrix::getTranslationVector().
Operator that allows to multiply a rotation matrix by a 3-by-3 matrix. Allows for example to multiply a rotation matrix by a skew matrix.
[in] | M | : 3-by-3 matrix. |
M
. vpException::dimensionError | : If M is not a 3-by-3 dimension matrix. |
The following snippet shows how to use this method:
Definition at line 305 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpArray2D< Type >::getCols(), and vpArray2D< Type >::getRows().
vpRotationMatrix vpRotationMatrix::operator* | ( | const vpRotationMatrix & | R | ) | const |
Compute the product between two rotation matrices.
Definition at line 271 of file vpRotationMatrix.cpp.
References vpArray2D< Type >::rowPtrs, and vpArray2D< double >::rowPtrs.
vpTranslationVector vpRotationMatrix::operator* | ( | const vpTranslationVector & | tv | ) | const |
Multiply a rotation matrix by a translation vector and return the resulting translation vector.
Definition at line 403 of file vpRotationMatrix.cpp.
References vpArray2D< double >::rowPtrs.
vpRotationMatrix vpRotationMatrix::operator* | ( | double | x | ) | const |
Operator that allows to multiply all the elements of a rotation matrix by a scalar.
Definition at line 425 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.
vpRotationMatrix & vpRotationMatrix::operator*= | ( | double | x | ) |
Operator that allows to multiply all the elements of a rotation matrix by a scalar.
Definition at line 442 of file vpRotationMatrix.cpp.
References vpArray2D< double >::colNum, vpArray2D< double >::rowNum, and vpArray2D< double >::rowPtrs.
vpRotationMatrix & vpRotationMatrix::operator, | ( | double | val | ) |
Set the second and next element of the rotation matrix.
val | : Value of the matrix second or next element. |
The following example shows how to initialize a rotation matrix using this operator.
It produces the following printings:
Definition at line 255 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpException::dimensionError, m_index, and vpArray2D< double >::size().
vpRotationMatrix & vpRotationMatrix::operator<< | ( | double | val | ) |
Set rotation matrix first element.
val | : Value of the matrix first element. |
The following example shows how to initialize a rotation matrix using this operator.
It produces the following printings:
Definition at line 217 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, and m_index.
vpRotationMatrix & vpRotationMatrix::operator= | ( | const std::initializer_list< double > & | list | ) |
Set a rotation matrix from a list of 9 double values.
list | : List of double. The following code shows how to use this constructor to initialize a rotation matrix: #include <visp3/core/vpRotationMatrix.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
int main()
{
R = { 0, 0, -1, 0, -1, 0, -1, 0, 0 };
std::cout << "R:\n" << R << std::endl;
}
R:
0 0 -1
0 -1 0
-1 0 0
|
Definition at line 123 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpException::dimensionError, vpArray2D< double >::dsize, vpException::fatalError, isARotationMatrix(), and orthogonalize().
vpRotationMatrix & vpRotationMatrix::operator= | ( | const vpMatrix & | M | ) |
Converts a 3-by-3 matrix into a rotation matrix.
M | : Input matrix. |
vpException::fatalError | If the input matrix is not a rotation matrix. |
Definition at line 163 of file vpRotationMatrix.cpp.
References vpException::dimensionError, vpException::fatalError, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), and isARotationMatrix().
vpRotationMatrix & vpRotationMatrix::operator= | ( | const vpRotationMatrix & | R | ) |
Set the current rotation matrix from a rotation matrix R.
R | : Rotation matrix. vpRotationMatrix R2 = R1;
|
Definition at line 83 of file vpRotationMatrix.cpp.
References vpArray2D< Type >::rowPtrs, and vpArray2D< double >::rowPtrs.
Equal to comparison operator of a 2D array.
Definition at line 602 of file vpArray2D.h.
|
inlineinherited |
Set element using A[i][j] = x.
Definition at line 690 of file vpArray2D.h.
|
inlineinherited |
Get element using x = A[i][j].
Definition at line 692 of file vpArray2D.h.
void vpRotationMatrix::orthogonalize | ( | ) |
Perform rotation matrix orthogonalization.
Definition at line 1041 of file vpRotationMatrix.cpp.
References vpArray2D< double >::data, vpMatrix::det(), vpMatrix::svd(), and vpMatrix::t().
Referenced by operator=(), vpHomogeneousMatrix::orthogonalizeRotation(), vpHomogeneousMatrix::vpHomogeneousMatrix(), and vpRotationMatrix().
void vpRotationMatrix::printVector | ( | ) |
Print to std::cout the rotation matrix as a angle representation vector.
Definition at line 675 of file vpRotationMatrix.cpp.
|
inlineinherited |
Definition at line 539 of file vpArray2D.h.
|
inline |
This function is not applicable to a rotation matrix that is always a 3-by-3 matrix.
vpException::fatalError | When this function is called. |
Definition at line 198 of file vpRotationMatrix.h.
References vpException::fatalError.
|
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.
vpRotationMatrix vpRotationMatrix::t | ( | ) | const |
Return the rotation matrix transpose which is also the inverse of the rotation matrix.
Definition at line 621 of file vpRotationMatrix.cpp.
Referenced by vpVelocityTwistMatrix::extract(), vpHomogeneousMatrix::inverse(), inverse(), vpVelocityTwistMatrix::inverse(), and isARotationMatrix().
|
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.
|
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 1441 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 |
Definition at line 230 of file vpRotationMatrix.h.
Referenced by operator,(), 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.