-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.h
More file actions
42 lines (33 loc) · 662 Bytes
/
types.h
File metadata and controls
42 lines (33 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* File: types.h
* Author: rohit
*
* Created on September 5, 2015, 6:04 PM
*/
#ifndef _TYPES_H
#define _TYPES_H
//#define USEVALARR
#define USEFLOAT
#include <vector>
using std::vector;
#include <valarray>
using std::valarray;
typedef int INT;
#ifdef USEFLOAT
typedef float REAL;
#else
typedef double REAL;
#endif
#ifdef USEVALARR
typedef valarray<REAL> Array;
typedef valarray<Array> Matrix;
typedef valarray<int> ArrayInt;
typedef valarray<ArrayInt> MatrixInt;
#else
typedef vector<REAL> Array;
typedef vector<Array> Matrix;
typedef vector<int> ArrayInt;
typedef vector<ArrayInt> MatrixInt;
#endif
#define EPSILON 1e-12
#endif /* TYPES_H */