34 #include <visp3/core/vpConfig.h>
36 #include "private/vpMatrix_pseudo_inverse.h"
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 #if defined(VISP_HAVE_EIGEN3)
94 compute_pseudo_inverse(U, sv, V, nrows, ncols, svThreshold, Ap, rank_out,
nullptr,
nullptr,
nullptr,
nullptr);
145 unsigned int nrows =
getRows();
146 unsigned int ncols =
getCols();
154 compute_pseudo_inverse(U, sv, V, nrows, ncols, svThreshold, Ap, rank_out,
nullptr,
nullptr,
nullptr,
nullptr);
156 return static_cast<unsigned int>(rank_out);
212 unsigned int nrows =
getRows();
213 unsigned int ncols =
getCols();
217 Ap.
resize(ncols, nrows,
false,
false);
222 compute_pseudo_inverse(U, sv, V, nrows, ncols, svThreshold, Ap, rank_out,
nullptr,
nullptr,
nullptr,
nullptr);
224 return static_cast<unsigned int>(rank_out);
340 unsigned int nrows =
getRows();
341 unsigned int ncols =
getCols();
346 U.
resize(ncols, ncols,
true);
355 compute_pseudo_inverse(U, sv, V, nrows, ncols, svThreshold, Ap, rank_out,
nullptr, &imA, &imAt, &kerAt);
357 return static_cast<unsigned int>(rank_out);
402 unsigned int nrows =
getRows();
403 unsigned int ncols =
getCols();
405 double svThreshold = 1e-26;
412 compute_pseudo_inverse(U, sv, V, nrows, ncols, svThreshold, Ap, rank_out, &rank_in,
nullptr,
nullptr,
nullptr);
469 unsigned int nrows =
getRows();
470 unsigned int ncols =
getCols();
472 double svThreshold = 1e-26;
476 Ap.
resize(ncols, nrows,
false,
false);
481 compute_pseudo_inverse(U, sv, V, nrows, ncols, svThreshold, Ap, rank_out, &rank_in,
nullptr,
nullptr,
nullptr);
545 unsigned int nrows =
getRows();
546 unsigned int ncols =
getCols();
548 double svThreshold = 1e-26;
551 Ap.
resize(ncols, nrows,
false,
false);
556 compute_pseudo_inverse(U, sv, V, nrows, ncols, svThreshold, Ap, rank_out, &rank_in,
nullptr,
nullptr,
nullptr);
679 unsigned int nrows =
getRows();
680 unsigned int ncols =
getCols();
682 double svThreshold = 1e-26;
686 U.
resize(ncols, ncols,
true);
694 compute_pseudo_inverse(U, sv, V, nrows, ncols, svThreshold, Ap, rank_out, &rank_in, &imA, &imAt, &kerAt);
unsigned int getCols() const
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
unsigned int getRows() const
Implementation of column vector and the associated operations.
Implementation of a matrix and operations on matrices.
vpMatrix pseudoInverseEigen3(double svThreshold=1e-6) const
void insert(const vpMatrix &A, unsigned int r, unsigned int c)
void svdEigen3(vpColVector &w, vpMatrix &V)