Austin Schuh | 189376f | 2018-12-20 22:11:15 +1100 | [diff] [blame^] | 1 | static bool eigen_did_assert = false; |
| 2 | #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;} |
| 3 | |
Brian Silverman | 72890c2 | 2015-09-19 14:37:37 -0400 | [diff] [blame] | 4 | #include <iostream> |
Austin Schuh | 189376f | 2018-12-20 22:11:15 +1100 | [diff] [blame^] | 5 | #include <Eigen/Eigen> |
| 6 | |
| 7 | #ifndef M_PI |
| 8 | #define M_PI 3.1415926535897932384626433832795 |
| 9 | #endif |
| 10 | |
Brian Silverman | 72890c2 | 2015-09-19 14:37:37 -0400 | [diff] [blame] | 11 | |
| 12 | using namespace Eigen; |
| 13 | using namespace std; |
| 14 | |
| 15 | int main(int, char**) |
| 16 | { |
| 17 | cout.precision(3); |
| 18 | ${snippet_source_code} |
| 19 | return 0; |
| 20 | } |