INVERSE

Category
아이템: 
포스트 갯수1

C++에서 pseudo-inverse 구하기(Eigen)

By 찜질방 | 2017년 6월 27일 | 
#include<iostream>#include<Eigen/Core>#include<Eigen/SVD> template<typename _Matrix_Type_>_Matrix_Type_ pseudoInverse(const _Matrix_Type_ &a, double epsilon = std::numeric_limits<double>::epsilon()){ Eigen::JacobiSVD< _Matrix_Type_ > svd(a ,Eigen::ComputeThinU | Eigen::ComputeThinV); double tolerance = epsilon * std::max(a.cols(), a.rows()) *svd.sin