YARP
Yet Another Robot Platform
SVD.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_MATH_SVD_H
8 #define YARP_MATH_SVD_H
9 
10 #include <yarp/sig/Vector.h>
11 #include <yarp/sig/Matrix.h>
12 #include <yarp/math/api.h>
13 
14 namespace yarp
15 {
16  namespace math
17  {
37  void YARP_math_API SVD(const yarp::sig::Matrix &in,
41 
49  void YARP_math_API SVDMod(const yarp::sig::Matrix &in,
65 
72  yarp::sig::Matrix YARP_math_API pinv(const yarp::sig::Matrix &in, double tol=0.0);
73 
80  void YARP_math_API pinv(const yarp::sig::Matrix &in, yarp::sig::Matrix &out, double tol=0.0);
81 
90 
98  void YARP_math_API pinv(const yarp::sig::Matrix &in, yarp::sig::Matrix &out, yarp::sig::Vector &sv, double tol=0.0);
99 
107 
114 
121  void YARP_math_API pinvDamped(const yarp::sig::Matrix &in, yarp::sig::Matrix &out, double damp);
122 
130  void YARP_math_API pinvDamped(const yarp::sig::Matrix &in, yarp::sig::Matrix &out, yarp::sig::Vector &sv, double damp);
131 
140 
148  void YARP_math_API projectionMatrix(const yarp::sig::Matrix &A, yarp::sig::Matrix &out, double tol=0.0);
149 
159 
168  void YARP_math_API nullspaceProjection(const yarp::sig::Matrix &A, yarp::sig::Matrix &out, double tol=0.0);
169 
170  }
171 }
172 
173 #endif // YARP_MATH_SVD_H
contains the definition of a Matrix type
contains the definition of a Vector type
A class for a Matrix.
Definition: Matrix.h:43
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 ...
Definition: SVD.cpp:162
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....
Definition: SVD.cpp:22
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).
Definition: SVD.cpp:27
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).
Definition: SVD.cpp:46
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).
Definition: SVD.cpp:120
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 ...
Definition: SVD.cpp:187
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).
Definition: SVD.cpp:32
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_math_API
Definition: api.h:17