Medusa  1.1
Coordinate Free Mehless Method implementation
mm::JacobiSVDWrapper< scalar_t, QRPreconditioner > Class Template Reference

#include <JacobiSVDWrapper_fwd.hpp>

Detailed Description

template<typename scalar_t, int QRPreconditioner = Eigen::ColPivHouseholderQRPreconditioner>
class mm::JacobiSVDWrapper< scalar_t, QRPreconditioner >

Extends Eigen's JacobiSVD to compute thin U and thin V by default.

This class exists because is is currently impossible to specify additional parameters to JacobiSVD before calling the compute method. This class satisfies the Linear solver concept. can as such be supplied to approximation engines.

Template Parameters
scalar_tNumerical scalar type used in computations.
QRPreconditionerthis optional parameter allows to specify the type of QR decomposition that will be used internally for the R-SVD step for non-square matrices. See Eigen docs on JacobiSVD for possible values.

Usage example:

Eigen::MatrixXd M(7, 9);
M.setRandom();
JacobiSVDWrapper<double> svd;
svd.compute(M);
// This code is the save as above, with explicit parameter specification.
Eigen::JacobiSVD<Eigen::MatrixXd> svd2;
svd2.compute(M, Eigen::ComputeThinU | Eigen::ComputeThinV);
// Use svd.matrixU(), svd.solve(b) as usual.

Definition at line 33 of file JacobiSVDWrapper_fwd.hpp.

+ Inheritance diagram for mm::JacobiSVDWrapper< scalar_t, QRPreconditioner >:
+ Collaboration diagram for mm::JacobiSVDWrapper< scalar_t, QRPreconditioner >:

Public Member Functions

void compute (const Eigen::Matrix< scalar_t, Eigen::Dynamic, Eigen::Dynamic > &M)
 Override compute method by supplying Eigen::ComputeThinU | Eigen::ComputeThinV by default. More...
 

Member Function Documentation

◆ compute()

template<typename scalar_t , int QRPreconditioner>
void mm::JacobiSVDWrapper< scalar_t, QRPreconditioner >::compute ( const Eigen::Matrix< scalar_t, Eigen::Dynamic, Eigen::Dynamic > &  M)

Override compute method by supplying Eigen::ComputeThinU | Eigen::ComputeThinV by default.

Definition at line 14 of file JacobiSVDWrapper.hpp.


The documentation for this class was generated from the following files: