mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
get rid of using namespace Eigen in sample code
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
e4c40b092a
commit
39a6aff16c
@@ -1,15 +1,15 @@
|
||||
#include <iostream>
|
||||
#include <Eigen/Dense>
|
||||
|
||||
using namespace Eigen;
|
||||
using namespace std;
|
||||
using Eigen::MatrixXd;
|
||||
using Eigen::VectorXd;
|
||||
|
||||
int main()
|
||||
{
|
||||
MatrixXd m = MatrixXd::Random(3,3);
|
||||
m = (m + MatrixXd::Constant(3,3,1.2)) * 50;
|
||||
cout << "m =" << endl << m << endl;
|
||||
std::cout << "m =" << std::endl << m << std::endl;
|
||||
VectorXd v(3);
|
||||
v << 1, 2, 3;
|
||||
cout << "m * v =" << endl << m * v << endl;
|
||||
std::cout << "m * v =" << std::endl << m * v << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user