2016-05-27 00:13:33 +08:00
|
|
|
static bool eigen_did_assert = false;
|
2023-12-06 05:22:55 +08:00
|
|
|
#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; \
|
|
|
|
|
}
|
2016-05-27 00:13:33 +08:00
|
|
|
|
2010-03-09 03:34:24 +08:00
|
|
|
#include <iostream>
|
2023-04-07 03:20:41 +08:00
|
|
|
#include <cassert>
|
2016-05-27 00:13:33 +08:00
|
|
|
#include <Eigen/Eigen>
|
2008-07-16 07:56:17 +08:00
|
|
|
|
2015-07-22 18:29:18 +08:00
|
|
|
#ifndef M_PI
|
|
|
|
|
#define M_PI 3.1415926535897932384626433832795
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-07-20 06:59:05 +08:00
|
|
|
using namespace Eigen;
|
2007-12-21 17:30:32 +08:00
|
|
|
using namespace std;
|
2008-07-16 07:56:17 +08:00
|
|
|
|
2023-12-06 05:22:55 +08:00
|
|
|
int main(int, char**) {
|
2010-06-28 19:30:10 +08:00
|
|
|
cout.precision(3);
|
2020-01-03 20:47:43 +08:00
|
|
|
// intentionally remove indentation of snippet
|
|
|
|
|
{
|
|
|
|
|
${snippet_source_code}
|
|
|
|
|
}
|
2008-07-16 07:56:17 +08:00
|
|
|
return 0;
|
2007-12-21 17:30:32 +08:00
|
|
|
}
|