mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
21 lines
506 B
C++
21 lines
506 B
C++
static bool eigen_did_assert = false;
|
|
#define eigen_assert(X) if(!eigen_did_assert && !(X)){ std::cout << "### Assertion raised in " << __FILE__ << ":" << __LINE__ << ":\n" #X << "\n### The following would happen without assertions:\n"; eigen_did_assert = true;}
|
|
|
|
#include <iostream>
|
|
#include <Eigen/Eigen>
|
|
|
|
#ifndef M_PI
|
|
#define M_PI 3.1415926535897932384626433832795
|
|
#endif
|
|
|
|
|
|
using namespace Eigen;
|
|
using namespace std;
|
|
|
|
int main(int, char**)
|
|
{
|
|
cout.precision(3);
|
|
${snippet_source_code}
|
|
return 0;
|
|
}
|