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,16 +1,13 @@
|
||||
#include <iostream>
|
||||
#include <Eigen/Dense>
|
||||
|
||||
using namespace std;
|
||||
using namespace Eigen;
|
||||
|
||||
int main()
|
||||
{
|
||||
Matrix3f A;
|
||||
Eigen::Matrix3f A;
|
||||
A << 1, 2, 1,
|
||||
2, 1, 0,
|
||||
-1, 1, 2;
|
||||
cout << "Here is the matrix A:\n" << A << endl;
|
||||
cout << "The determinant of A is " << A.determinant() << endl;
|
||||
cout << "The inverse of A is:\n" << A.inverse() << endl;
|
||||
std::cout << "Here is the matrix A:\n" << A << std::endl;
|
||||
std::cout << "The determinant of A is " << A.determinant() << std::endl;
|
||||
std::cout << "The inverse of A is:\n" << A.inverse() << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user