57#define Assert(c) if(!(c))\
58 {std::cout << "\nAssertion violation " << __FILE__ << ":" << __LINE__ << std::endl;}
59#define Assert0(C) Debug0(Assert(C))
60#define Assert1(C) Debug1(Assert(C))
61#define Assert2(C) Debug2(Assert(C))
62#define Assert3(C) Debug3(Assert(C))
63#define Assert4(C) Debug4(Assert(C))
64#define Assert5(C) Debug5(Assert(C))
66#define Error(s) {std::cout << "\nError:" << s << " " << __FILE__ << ":" << __LINE__ << std::endl;}
71#define Max(x,y) ((x)>=(y)?(x):(y))
75#define Min(x,y) ((x)<=(y)?(x):(y))
79#define Abs(x) ((x) < 0 ? -(x) : (x))
87inline double limit(
double x,
double bound)
89 if (x > bound) {
return bound; }
90 else if (x < -bound) {
return -bound; }
116 return clock() * 1e-6;
double limit(double x, double bound)