YARP
Yet Another Robot Platform
SVD.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_MATH_SVD_H
11 #define YARP_MATH_SVD_H
12 
13 #include <yarp/sig/Vector.h>
14 #include <yarp/sig/Matrix.h>
15 #include <yarp/math/api.h>
16 
17 namespace yarp
18 {
19  namespace math
20  {
40  void YARP_math_API SVD(const yarp::sig::Matrix &in,
44 
52  void YARP_math_API SVDMod(const yarp::sig::Matrix &in,
68 
75  yarp::sig::Matrix YARP_math_API pinv(const yarp::sig::Matrix &in, double tol=0.0);
76 
83  void YARP_math_API pinv(const yarp::sig::Matrix &in, yarp::sig::Matrix &out, double tol=0.0);
84 
93 
101  void YARP_math_API pinv(const yarp::sig::Matrix &in, yarp::sig::Matrix &out, yarp::sig::Vector &sv, double tol=0.0);
102 
110 
117 
124  void YARP_math_API pinvDamped(const yarp::sig::Matrix &in, yarp::sig::Matrix &out, double damp);
125 
133  void YARP_math_API pinvDamped(const yarp::sig::Matrix &in, yarp::sig::Matrix &out, yarp::sig::Vector &sv, double damp);
134 
143 
151  void YARP_math_API projectionMatrix(const yarp::sig::Matrix &A, yarp::sig::Matrix &out, double tol=0.0);
152 
162 
171  void YARP_math_API nullspaceProjection(const yarp::sig::Matrix &A, yarp::sig::Matrix &out, double tol=0.0);
172 
173  }
174 }
175 
176 #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:46
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:153
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:25
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:30
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:49
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:113
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:178
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:35
The main, catch-all namespace for YARP.
Definition: environment.h:25
#define YARP_math_API
Definition: api.h:18