defines.h
Go to the documentation of this file.
1 #ifndef _DEFINES_H
2 #define _DEFINES_H
3 
4 #include <string>
5 #include <math.h>
6 #include<Eigen/Dense>
7 
8 using namespace Eigen;
9 using namespace std;
10 
11 
21 #ifndef USE_DOUBLE
22 
28  #define USE_DOUBLE 0
29 #endif
30 
31 
32 #if USE_DOUBLE
33 
34  #define real double
35 #else
36 
37  #define real float
38 #endif
39 
41 typedef Eigen::Matrix<real,3,3> Matrix3;
42 
44 typedef Eigen::Matrix<real,3,1> Vector3;
45 
47 typedef Eigen::Matrix<real,4,4> Matrix4;
48 
50 typedef Eigen::Matrix<real,4,1> Vector4;
51 
58 #define sign(x) ({ typeof (x) _x = (x); (_x>0?1:(_x<0?-1:0)); })
59 
60 
61 #endif