Namespaces | |
impl | |
Classes | |
class | FrameTransform |
class | NormRand |
A static class grouping function for normal random number generator. More... | |
class | Quaternion |
class | Rand |
A static class grouping function for uniform random number generator. More... | |
class | RandnScalar |
A random number generator, normal distribution. More... | |
class | RandScalar |
A random number generator, uniform in the range 0-1. More... | |
class | Vec2D |
Functions | |
yarp::sig::Matrix | pile (const yarp::sig::Matrix &m1, const yarp::sig::Matrix &m2) |
Matrix-Matrix concatenation by column (defined in Math.h). More... | |
yarp::sig::Matrix | pile (const yarp::sig::Vector &v, const yarp::sig::Matrix &m) |
Vector-Matrix concatenation (defined in Math.h). More... | |
yarp::sig::Matrix | pile (const yarp::sig::Matrix &m, const yarp::sig::Vector &v) |
Matrix-Vector concatenation (defined in Math.h). More... | |
yarp::sig::Matrix | pile (const yarp::sig::Vector &v1, const yarp::sig::Vector &v2) |
Vector-Vector concatenation (defined in Math.h). More... | |
yarp::sig::Matrix | cat (const yarp::sig::Matrix &m1, const yarp::sig::Matrix &m2) |
Matrix-Matrix concatenation by row (defined in Math.h). More... | |
yarp::sig::Matrix | cat (const yarp::sig::Matrix &m, const yarp::sig::Vector &v) |
Matrix-Vector concatenation (defined in Math.h). More... | |
yarp::sig::Matrix | cat (const yarp::sig::Vector &v, const yarp::sig::Matrix &m) |
Vector-Matrix concatenation (defined in Math.h). More... | |
yarp::sig::Vector | cat (const yarp::sig::Vector &v1, const yarp::sig::Vector &v2) |
Vector-Vector concatenation (defined in Math.h). More... | |
yarp::sig::Vector | cat (const yarp::sig::Vector &v, double s) |
Vector-scalar concatenation (defined in Math.h). More... | |
yarp::sig::Vector | cat (double s, const yarp::sig::Vector &v) |
Scalar-vector concatenation (defined in Math.h). More... | |
yarp::sig::Vector | cat (double s1, double s2) |
Scalar-scalar concatenation (defined in Math.h). More... | |
yarp::sig::Vector | cat (double s1, double s2, double s3) |
yarp::sig::Vector | cat (double s1, double s2, double s3, double s4) |
yarp::sig::Vector | cat (double s1, double s2, double s3, double s4, double s5) |
double | dot (const yarp::sig::Vector &a, const yarp::sig::Vector &b) |
Scalar product between vectors (defined in Math.h). More... | |
yarp::sig::Matrix | outerProduct (const yarp::sig::Vector &a, const yarp::sig::Vector &b) |
Outer product between vectors (defined in Math.h). More... | |
yarp::sig::Vector | cross (const yarp::sig::Vector &a, const yarp::sig::Vector &b) |
Compute the cross product between two vectors (defined in Math.h). More... | |
yarp::sig::Matrix | crossProductMatrix (const yarp::sig::Vector &v) |
Compute the cross product matrix, that is a 3-by-3 skew-symmetric matrix (defined in Math.h). More... | |
bool | crossProductMatrix (const yarp::sig::Vector &v, yarp::sig::Matrix &res) |
Compute the cross product matrix, that is a 3-by-3 skew-symmetric matrix (defined in Math.h). More... | |
double | norm (const yarp::sig::Vector &v) |
Returns the Euclidean norm of the vector (defined in Math.h). More... | |
double | norm2 (const yarp::sig::Vector &v) |
Returns the Euclidean squared norm of the vector (defined in Math.h). More... | |
double | findMax (const yarp::sig::Vector &v) |
Returns the maximum of the elements of a real vector (defined in Math.h). More... | |
double | findMin (const yarp::sig::Vector &v) |
Returns the minimum of the elements of a real vector (defined in Math.h). More... | |
yarp::sig::Vector | zeros (int s) |
Creates a vector of zeros (defined in Math.h). More... | |
yarp::sig::Vector | ones (int s) |
Creates a vector of ones (defined in Math.h). More... | |
yarp::sig::Matrix | eye (int r, int c) |
Build an identity matrix (defined in Math.h). More... | |
yarp::sig::Matrix | eye (int n) |
Build a square identity matrix (defined in Math.h). More... | |
yarp::sig::Matrix | zeros (int r, int c) |
Build a matrix of zeros (defined in Math.h). More... | |
double | det (const yarp::sig::Matrix &in) |
Computes the determinant of a matrix (defined in Math.h). More... | |
yarp::sig::Matrix | luinv (const yarp::sig::Matrix &in) |
Invert a square matrix using LU-decomposition (defined in Math.h). More... | |
bool | eigenValues (const yarp::sig::Matrix &in, yarp::sig::Vector &real, yarp::sig::Vector &img) |
Computes eigenvalues of the n-by-n real nonsymmetric matrix (defined in Math.h). More... | |
double | sign (const double &v) |
Invert a symmetric and positive definite matrix using Cholesky decomposition (defined in Math.h). More... | |
yarp::sig::Vector | sign (const yarp::sig::Vector &v) |
Returns the sign vector of a real vector, that is a vector with 1 if the value is positive, -1 if negative, 0 if equal to zero (defined in Math.h). More... | |
yarp::sig::Vector | dcm2axis (const yarp::sig::Matrix &R) |
Converts a dcm (direction cosine matrix) rotation matrix R to axis/angle representation (defined in Math.h). More... | |
yarp::sig::Matrix | axis2dcm (const yarp::sig::Vector &v) |
Returns a dcm (direction cosine matrix) rotation matrix R from axis/angle representation (defined in Math.h). More... | |
yarp::sig::Vector | dcm2euler (const yarp::sig::Matrix &R) |
Converts a dcm (direction cosine matrix) rotation matrix to euler angles (ZYZ) (defined in Math.h). More... | |
yarp::sig::Matrix | euler2dcm (const yarp::sig::Vector &euler) |
Converts euler angles (ZYZ) vector in the corresponding dcm (direction cosine matrix) rotation matrix (defined in Math.h). More... | |
yarp::sig::Vector | dcm2rpy (const yarp::sig::Matrix &R) |
Converts a dcm (direction cosine matrix) rotation matrix to roll-pitch-yaw angles (defined in Math.h). More... | |
yarp::sig::Matrix | rpy2dcm (const yarp::sig::Vector &rpy) |
Converts roll-pitch-yaw angles in the corresponding dcm (direction cosine matrix) rotation matrix (defined in Math.h). More... | |
yarp::sig::Vector | dcm2ypr (const yarp::sig::Matrix &R) |
Converts a dcm (direction cosine matrix) rotation matrix to yaw-roll-pitch angles (defined in Math.h). More... | |
yarp::sig::Matrix | ypr2dcm (const yarp::sig::Vector &ypr) |
Converts yaw-pitch-roll angles in the corresponding dcm (direction cosine matrix) rotation matrix (defined in Math.h). More... | |
yarp::sig::Matrix | SE3inv (const yarp::sig::Matrix &H) |
Returns the inverse of a 4 by 4 rototranslational matrix (defined in Math.h). More... | |
yarp::sig::Matrix | adjoint (const yarp::sig::Matrix &H) |
Returns the adjoint matrix of a given roto-translational matrix (defined in Math.h). More... | |
yarp::sig::Matrix | adjointInv (const yarp::sig::Matrix &H) |
Returns the inverse of the adjoint matrix of a given roto-translational matrix (defined in Math.h). More... | |
void | SVD (const yarp::sig::Matrix &in, yarp::sig::Matrix &U, yarp::sig::Vector &S, yarp::sig::Matrix &V) |
Factorize the M-by-N matrix 'in' into the singular value decomposition in = U S V^T (defined in SVD.h). More... | |
void | SVDMod (const yarp::sig::Matrix &in, yarp::sig::Matrix &U, yarp::sig::Vector &S, yarp::sig::Matrix &V) |
Perform SVD decomposition on a MxN matrix (for M >= N) (defined in SVD.h). More... | |
void | SVDJacobi (const yarp::sig::Matrix &in, yarp::sig::Matrix &U, yarp::sig::Vector &S, yarp::sig::Matrix &V) |
Perform SVD decomposition on a matrix using the Jacobi method (defined in SVD.h). More... | |
yarp::sig::Matrix | pinv (const yarp::sig::Matrix &in, double tol=0.0) |
Perform the moore-penrose pseudo-inverse of a matrix (defined in SVD.h). More... | |
void | pinv (const yarp::sig::Matrix &in, yarp::sig::Matrix &out, double tol=0.0) |
Perform the moore-penrose pseudo-inverse of a matrix (defined in SVD.h). More... | |
yarp::sig::Matrix | pinv (const yarp::sig::Matrix &in, yarp::sig::Vector &sv, double tol=0.0) |
Perform the moore-penrose pseudo-inverse of a matrix (defined in SVD.h). More... | |
void | pinv (const yarp::sig::Matrix &in, yarp::sig::Matrix &out, yarp::sig::Vector &sv, double tol=0.0) |
Perform the moore-penrose pseudo-inverse of a matrix (defined in SVD.h). More... | |
yarp::sig::Matrix | pinvDamped (const yarp::sig::Matrix &in, yarp::sig::Vector &sv, double damp) |
Perform the damped pseudo-inverse of a matrix (defined in SVD.h). More... | |
yarp::sig::Matrix | pinvDamped (const yarp::sig::Matrix &in, double damp) |
Perform the damped pseudo-inverse of a matrix (defined in SVD.h). More... | |
void | pinvDamped (const yarp::sig::Matrix &in, yarp::sig::Matrix &out, double damp) |
Perform the damped pseudo-inverse of a matrix (defined in SVD.h). More... | |
void | pinvDamped (const yarp::sig::Matrix &in, yarp::sig::Matrix &out, yarp::sig::Vector &sv, double damp) |
Perform the damped pseudo-inverse of a matrix (defined in SVD.h). More... | |
yarp::sig::Matrix | projectionMatrix (const yarp::sig::Matrix &A, double tol=0.0) |
Compute the projection matrix of A, that is defined as A times its pseudoinverse: A*pinv(A) (defined in SVD.h). More... | |
void | projectionMatrix (const yarp::sig::Matrix &A, yarp::sig::Matrix &out, double tol=0.0) |
Compute the projection matrix of A, that is defined as A times its pseudoinverse: A*pinv(A) (defined in SVD.h). More... | |
yarp::sig::Matrix | nullspaceProjection (const yarp::sig::Matrix &A, double tol=0.0) |
Compute the nullspace projection matrix of A, that is defined as the difference between the identity matrix and the pseudoinverse of A times A: (I - pinv(A)*A) (defined in SVD.h). More... | |
void | nullspaceProjection (const yarp::sig::Matrix &A, yarp::sig::Matrix &out, double tol=0.0) |
Compute the nullspace projection matrix of A, that is defined as the difference between the identity matrix and the pseudoinverse of A times A: (I - pinv(A)*A) (defined in SVD.h). More... | |
Matrix yarp::math::adjoint | ( | const yarp::sig::Matrix & | H | ) |
Returns the adjoint matrix of a given roto-translational matrix (defined in Math.h).
The adjoint is a (6x6) matrix: [R , S(r)*R; 0, R] where R is the rotational part of H, and r the translational part.
H | is the 4 by 4 rototranslational matrix. |
Matrix yarp::math::adjointInv | ( | const yarp::sig::Matrix & | H | ) |
Returns the inverse of the adjoint matrix of a given roto-translational matrix (defined in Math.h).
The inverse of an adjoint is a (6x6) matrix: [R^T , -S(R^T*r)*R^T; 0 , R^T] where R is the rotational part of H, and r the translational part.
H | is the 4 by 4 rototranslational matrix. |
Matrix yarp::math::axis2dcm | ( | const yarp::sig::Vector & | v | ) |
Matrix yarp::math::cat | ( | const yarp::sig::Matrix & | m, |
const yarp::sig::Vector & | v | ||
) |
Matrix yarp::math::cat | ( | const yarp::sig::Matrix & | m1, |
const yarp::sig::Matrix & | m2 | ||
) |
Matrix yarp::math::cat | ( | const yarp::sig::Vector & | v, |
const yarp::sig::Matrix & | m | ||
) |
Vector yarp::math::cat | ( | const yarp::sig::Vector & | v, |
double | s | ||
) |
Vector yarp::math::cat | ( | const yarp::sig::Vector & | v1, |
const yarp::sig::Vector & | v2 | ||
) |
Vector yarp::math::cat | ( | double | s, |
const yarp::sig::Vector & | v | ||
) |
Vector yarp::math::cat | ( | double | s1, |
double | s2 | ||
) |
Vector yarp::math::cat | ( | double | s1, |
double | s2, | ||
double | s3, | ||
double | s4 | ||
) |
Vector yarp::math::cat | ( | double | s1, |
double | s2, | ||
double | s3, | ||
double | s4, | ||
double | s5 | ||
) |
Vector yarp::math::cross | ( | const yarp::sig::Vector & | a, |
const yarp::sig::Vector & | b | ||
) |
Matrix yarp::math::crossProductMatrix | ( | const yarp::sig::Vector & | v | ) |
bool yarp::math::crossProductMatrix | ( | const yarp::sig::Vector & | v, |
yarp::sig::Matrix & | res | ||
) |
Vector yarp::math::dcm2axis | ( | const yarp::sig::Matrix & | R | ) |
Vector yarp::math::dcm2euler | ( | const yarp::sig::Matrix & | R | ) |
Converts a dcm (direction cosine matrix) rotation matrix to euler angles (ZYZ) (defined in Math.h).
Three angles are returned in a vector with the following format:
such that the returned matrix satisfies the following:
R | is the input ZYZ rotation matrix. |
Vector yarp::math::dcm2rpy | ( | const yarp::sig::Matrix & | R | ) |
Converts a dcm (direction cosine matrix) rotation matrix to roll-pitch-yaw angles (defined in Math.h).
Three angles are returned in a vector with the following format:
such that the returned matrix satisfies the following:
R | is the input ZYX rotation matrix. |
Vector yarp::math::dcm2ypr | ( | const yarp::sig::Matrix & | R | ) |
Converts a dcm (direction cosine matrix) rotation matrix to yaw-roll-pitch angles (defined in Math.h).
Three angles are returned in a vector with the following format:
such that the returned matrix satisfies the following:
R | is the input XYZ rotation matrix. |
double yarp::math::det | ( | const yarp::sig::Matrix & | in | ) |
double yarp::math::dot | ( | const yarp::sig::Vector & | a, |
const yarp::sig::Vector & | b | ||
) |
bool yarp::math::eigenValues | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Vector & | real, | ||
yarp::sig::Vector & | img | ||
) |
Computes eigenvalues of the n-by-n real nonsymmetric matrix (defined in Math.h).
in | nonsymmetric n-by-n matrix |
real | the real part of eigen values |
img | the imaginary part of eigen values |
Matrix yarp::math::euler2dcm | ( | const yarp::sig::Vector & | euler | ) |
Converts euler angles (ZYZ) vector in the corresponding dcm (direction cosine matrix) rotation matrix (defined in Math.h).
The three euler angles are specified in a vector with the following structure:
and the returned matrix is:
euler | is the input vector (alpha=z-rotation, beta=y-rotation, gamma=z-rotation). |
Matrix yarp::math::eye | ( | int | n | ) |
Matrix yarp::math::eye | ( | int | r, |
int | c | ||
) |
double yarp::math::findMax | ( | const yarp::sig::Vector & | v | ) |
double yarp::math::findMin | ( | const yarp::sig::Vector & | v | ) |
Matrix yarp::math::luinv | ( | const yarp::sig::Matrix & | in | ) |
double yarp::math::norm | ( | const yarp::sig::Vector & | v | ) |
double yarp::math::norm2 | ( | const yarp::sig::Vector & | v | ) |
Matrix yarp::math::nullspaceProjection | ( | const yarp::sig::Matrix & | A, |
double | tol = 0.0 |
||
) |
Compute the nullspace projection matrix of A, that is defined as the difference between the identity matrix and the pseudoinverse of A times A: (I - pinv(A)*A) (defined in SVD.h).
Multiplying this null projection matrix times a vector projects the vector in the nullspace of A.
A | input matrix |
tol | singular values less than tol are set to zero |
void yarp::math::nullspaceProjection | ( | const yarp::sig::Matrix & | A, |
yarp::sig::Matrix & | out, | ||
double | tol = 0.0 |
||
) |
Compute the nullspace projection matrix of A, that is defined as the difference between the identity matrix and the pseudoinverse of A times A: (I - pinv(A)*A) (defined in SVD.h).
Multiplying this projection matrix times a vector projects the vector in the range of A.
A | input matrix |
out | the projection matrix associated with the nullspace of A |
tol | singular values less than tol are set to zero |
Vector yarp::math::ones | ( | int | s | ) |
Matrix yarp::math::outerProduct | ( | const yarp::sig::Vector & | a, |
const yarp::sig::Vector & | b | ||
) |
Matrix yarp::math::pile | ( | const yarp::sig::Matrix & | m, |
const yarp::sig::Vector & | v | ||
) |
Matrix yarp::math::pile | ( | const yarp::sig::Matrix & | m1, |
const yarp::sig::Matrix & | m2 | ||
) |
Matrix yarp::math::pile | ( | const yarp::sig::Vector & | v, |
const yarp::sig::Matrix & | m | ||
) |
Matrix yarp::math::pile | ( | const yarp::sig::Vector & | v1, |
const yarp::sig::Vector & | v2 | ||
) |
Matrix yarp::math::pinv | ( | const yarp::sig::Matrix & | in, |
double | tol = 0.0 |
||
) |
void yarp::math::pinv | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Matrix & | out, | ||
double | tol = 0.0 |
||
) |
void yarp::math::pinv | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Matrix & | out, | ||
yarp::sig::Vector & | sv, | ||
double | tol = 0.0 |
||
) |
Matrix yarp::math::pinv | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Vector & | sv, | ||
double | tol = 0.0 |
||
) |
Matrix yarp::math::pinvDamped | ( | const yarp::sig::Matrix & | in, |
double | damp | ||
) |
void yarp::math::pinvDamped | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Matrix & | out, | ||
double | damp | ||
) |
void yarp::math::pinvDamped | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Matrix & | out, | ||
yarp::sig::Vector & | sv, | ||
double | damp | ||
) |
Matrix yarp::math::pinvDamped | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Vector & | sv, | ||
double | damp | ||
) |
Matrix yarp::math::projectionMatrix | ( | const yarp::sig::Matrix & | A, |
double | tol = 0.0 |
||
) |
Compute the projection matrix of A, that is defined as A times its pseudoinverse: A*pinv(A) (defined in SVD.h).
Multiplying this projection matrix times a vector projects the vector in the range of A.
A | input matrix |
tol | singular values less than tol are set to zero |
void yarp::math::projectionMatrix | ( | const yarp::sig::Matrix & | A, |
yarp::sig::Matrix & | out, | ||
double | tol = 0.0 |
||
) |
Compute the projection matrix of A, that is defined as A times its pseudoinverse: A*pinv(A) (defined in SVD.h).
Multiplying this projection matrix times a vector projects the vector in the range of A.
A | input matrix |
out | the projection matrix associated with the range of A |
tol | singular values less than tol are set to zero |
Matrix yarp::math::rpy2dcm | ( | const yarp::sig::Vector & | rpy | ) |
Converts roll-pitch-yaw angles in the corresponding dcm (direction cosine matrix) rotation matrix (defined in Math.h).
The three angles are specified in a vector with the following structure:
and the returned matrix is:
rpy | is the input vector (\psi=roll x-rotation,\theta=pitch y-rotation, \phi=yaw z-rotation). |
Matrix yarp::math::SE3inv | ( | const yarp::sig::Matrix & | H | ) |
double yarp::math::sign | ( | const double & | v | ) |
Invert a symmetric and positive definite matrix using Cholesky decomposition (defined in Math.h).
in | symmetric and positive definite matrix |
v | is a real number. |
Vector yarp::math::sign | ( | const yarp::sig::Vector & | v | ) |
void yarp::math::SVD | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Matrix & | U, | ||
yarp::sig::Vector & | S, | ||
yarp::sig::Matrix & | V | ||
) |
Factorize the M-by-N matrix 'in' into the singular value decomposition in = U S V^T (defined in SVD.h).
The diagonal elements of the singular value matrix S are stored in the vector S. The singular values are non-negative and form a non-increasing sequence from S_1 to S_N. The matrix V contains the elements of V in untransposed form. To form the product U S V^T it is necessary to take the transpose of V. Defining K as min(M, N) the the input matrices are:
in | input M-by-N matrix to decompose |
U | output M-by-K orthogonal matrix |
S | output K-dimensional vector containing the diagonal entries of the diagonal matrix S |
V | output N-by-K orthogonal matrix |
void yarp::math::SVDJacobi | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Matrix & | U, | ||
yarp::sig::Vector & | S, | ||
yarp::sig::Matrix & | V | ||
) |
Perform SVD decomposition on a matrix using the Jacobi method (defined in SVD.h).
The Jacobi method can compute singular values to higher relative accuracy than Golub-Reinsch algorithms.
void yarp::math::SVDMod | ( | const yarp::sig::Matrix & | in, |
yarp::sig::Matrix & | U, | ||
yarp::sig::Vector & | S, | ||
yarp::sig::Matrix & | V | ||
) |
Matrix yarp::math::ypr2dcm | ( | const yarp::sig::Vector & | ypr | ) |
Converts yaw-pitch-roll angles in the corresponding dcm (direction cosine matrix) rotation matrix (defined in Math.h).
The three angles are specified in a vector with the following structure:
and the returned matrix is:
ypr | is the input vector (\phi=yaw z-rotation, \theta=pitch y-rotation, \psi=roll x-rotation). |
Matrix yarp::math::zeros | ( | int | r, |
int | c | ||
) |