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,19 +1,16 @@
|
||||
#include <Eigen/Dense>
|
||||
#include <iostream>
|
||||
|
||||
using namespace Eigen;
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
ArrayXf a = ArrayXf::Random(5);
|
||||
Eigen::ArrayXf a = Eigen::ArrayXf::Random(5);
|
||||
a *= 2;
|
||||
cout << "a =" << endl
|
||||
<< a << endl;
|
||||
cout << "a.abs() =" << endl
|
||||
<< a.abs() << endl;
|
||||
cout << "a.abs().sqrt() =" << endl
|
||||
<< a.abs().sqrt() << endl;
|
||||
cout << "a.min(a.abs().sqrt()) =" << endl
|
||||
<< a.min(a.abs().sqrt()) << endl;
|
||||
std::cout << "a =" << std::endl
|
||||
<< a << std::endl;
|
||||
std::cout << "a.abs() =" << std::endl
|
||||
<< a.abs() << std::endl;
|
||||
std::cout << "a.abs().sqrt() =" << std::endl
|
||||
<< a.abs().sqrt() << std::endl;
|
||||
std::cout << "a.min(a.abs().sqrt()) =" << std::endl
|
||||
<< a.min(a.abs().sqrt()) << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user