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,13 +1,12 @@
#include <iostream>
#include <Eigen/Dense>
using namespace Eigen;
int main()
{
Matrix2d mat;
Eigen::Matrix2d mat;
mat << 1, 2,
3, 4;
Vector2d u(-1,1), v(2,0);
Eigen::Vector2d u(-1,1), v(2,0);
std::cout << "Here is mat*mat:\n" << mat*mat << std::endl;
std::cout << "Here is mat*u:\n" << mat*u << std::endl;
std::cout << "Here is u^T*mat:\n" << u.transpose()*mat << std::endl;