2016-05-26 18:13:33 +02:00
|
|
|
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; \
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-08 20:34:24 +01:00
|
|
|
#include <iostream>
|
2023-04-06 19:20:41 +00:00
|
|
|
#include <cassert>
|
2025-02-01 00:00:31 +00:00
|
|
|
#include <Eigen/Dense>
|
|
|
|
|
#include <Eigen/Sparse>
|
2015-07-22 12:29:18 +02:00
|
|
|
|
2008-07-19 22:59:05 +00:00
|
|
|
using namespace Eigen;
|
2007-12-21 09:30:32 +00:00
|
|
|
using namespace std;
|
2008-07-15 23:56:17 +00:00
|
|
|
|
2007-12-21 09:30:32 +00:00
|
|
|
int main(int, char**) {
|
2010-06-28 13:30:10 +02:00
|
|
|
cout.precision(3);
|
2020-01-03 13:47:43 +01:00
|
|
|
// intentionally remove indentation of snippet
|
|
|
|
|
{
|
|
|
|
|
${snippet_source_code}
|
|
|
|
|
}
|
2008-07-15 23:56:17 +00:00
|
|
|
return 0;
|
2007-12-21 09:30:32 +00:00
|
|
|
}
|