get rid of using namespace Eigen in sample code

This commit is contained in:
Erik Schultheis
2021-12-07 19:57:38 +00:00
committed by Rasmus Munk Larsen
parent e4c40b092a
commit 39a6aff16c
58 changed files with 274 additions and 399 deletions

View File

@@ -1,15 +1,12 @@
#include <Eigen/Core>
#include <iostream>
using namespace Eigen;
using namespace std;
int main(void)
int main()
{
int const N = 5;
MatrixXi A(N,N);
Eigen::MatrixXi A(N,N);
A.setRandom();
cout << "A =\n" << A << '\n' << endl;
cout << "A(1..3,:) =\n" << A.middleCols(1,3) << endl;
std::cout << "A =\n" << A << '\n' << std::endl;
std::cout << "A(1..3,:) =\n" << A.middleCols(1,3) << std::endl;
return 0;
}