ADD: added other eigen lib
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
#include <iostream>
|
||||
#include <Eigen/Dense>
|
||||
|
||||
using namespace std;
|
||||
using namespace Eigen;
|
||||
|
||||
int main()
|
||||
{
|
||||
MatrixXf A = MatrixXf::Random(3, 2);
|
||||
cout << "Here is the matrix A:\n" << A << endl;
|
||||
VectorXf b = VectorXf::Random(3);
|
||||
cout << "Here is the right hand side b:\n" << b << endl;
|
||||
cout << "The least-squares solution is:\n"
|
||||
<< A.bdcSvd(ComputeThinU | ComputeThinV).solve(b) << endl;
|
||||
Eigen::MatrixXf A = Eigen::MatrixXf::Random(3, 2);
|
||||
std::cout << "Here is the matrix A:\n" << A << std::endl;
|
||||
Eigen::VectorXf b = Eigen::VectorXf::Random(3);
|
||||
std::cout << "Here is the right hand side b:\n" << b << std::endl;
|
||||
std::cout << "The least-squares solution is:\n"
|
||||
<< A.template bdcSvd<Eigen::ComputeThinU | Eigen::ComputeThinV>().solve(b) << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user