Openholo
v4.2
Open Source Digital Holographic Library
real.h
Go to the documentation of this file.
1
#ifndef __real_h
2
#define __real_h
3
4
5
6
namespace
oph
{
7
8
9
//template<class T = double>
10
//struct real_number
11
//{
12
// //using realnum = typename std::enable_if<std::is_same<double, T>::value || std::is_same<float, T>::value, T>::type;
13
14
// T t;
15
16
// real_number() { }
17
// real_number(T p) { t = p; }
18
19
// ~real_number() { }
20
21
// inline bool operator == (const real_number<T>& p) { return t == p.t; }
22
// inline bool operator == (double p) { return t == p; }
23
// inline bool operator == (float p) { return t == p; }
24
//
25
// inline bool operator > (const real_number<T>& p) { return t > p.t; }
26
// inline bool operator > (double p) { return t > p; }
27
// inline bool operator > (float p) { return t > p; }
28
//
29
// inline bool operator >= (const real_number<T>& p) { return t >= p.t; }
30
// inline bool operator >= (double p) { return t > p; }
31
// inline bool operator >= (float p) { return t > p; }
32
//
33
// inline bool operator < (const real_number<T>& p) { return t < p.t; }
34
// inline bool operator < (double p) { return t < p; }
35
// inline bool operator < (float p) { return t < p; }
36
//
37
// inline bool operator <= (const real_number<T>& p) { return t <= p.t; }
38
// inline bool operator <= (double p) { return t <= p; }
39
// inline bool operator <= (float p) { return t <= p; }
40
//
41
// inline real_number<T>& operator = (const real_number<T>& b) { t = b.t; return *this; }
42
// inline real_number<T>& operator = (double b) { t = b; return *this; }
43
// inline real_number<T>& operator = (float b) { t = b; return *this; }
44
//
45
// inline T operator += (const real_number<T>& p) { return t += p.t; }
46
// inline double operator += (double p) { return t += p; }
47
// inline T operator += (float p) { return t += p; }
48
//
49
// inline T operator -= (const real_number<T>& p) { return t -= p.t; }
50
// inline double operator -= (double p) { return t -= p; }
51
// inline T operator -= (float p) { return t -= p; }
52
//
53
// inline T operator *= (const real_number<T>& p) { return t *= p.t; }
54
// inline double operator *= (double p) { return t *= p; }
55
// inline T operator *= (float p) { return t *= p; }
56
//
57
// inline T operator /= (const real_number<T>& p) { return t /= p.t; }
58
// inline double operator /= (double p) { return t /= p; }
59
// inline T operator /= (float p) { return t /= p; }
60
//
61
// inline T operator + (const real_number<T>& p) { return t + p.t; }
62
// inline T operator + (float p) { return t + p; }
63
// inline double operator + (double p) { return t + p; }
64
//
65
// inline T operator - (const real_number<T>& p) { return t - p.t; }
66
// inline double operator - (double p) { return t - p; }
67
// inline T operator - (float p) { return t - p; }
68
//
69
// inline T operator * (const real_number<T>& p) { return t * p.t; }
70
// inline double operator * (double p) { return t * p; }
71
// inline T operator * (float p) { return t * p; }
72
73
// inline T operator / (const real_number<T>& p) { return t / p.t; }
74
// inline double operator / (double p) { return t / p; }
75
// inline T operator / (float p) { return t / p; }
76
77
// inline T operator () () { return t; }
78
79
// inline friend bool operator < (double p, const real_number<T>&q) { return p < q.t; }
80
// inline friend bool operator <= (double p, const real_number<T>&q) { return p <= q.t; }
81
// inline friend bool operator > (double p, const real_number<T>&q) { return p > q.t; }
82
// inline friend bool operator >= (double p, const real_number<T>&q) { return p >= q.t; }
83
//
84
// inline friend bool operator < (float p, const real_number<T>&q) { return p < q.t; }
85
// inline friend bool operator <= (float p, const real_number<T>&q) { return p <= q.t; }
86
// inline friend bool operator > (float p, const real_number<T>&q) { return p > q.t; }
87
// inline friend bool operator >= (float p, const real_number<T>&q) { return p >= q.t; }
88
//
89
// inline friend bool operator == (double p, const real_number<T>&q) { return p == q.t; }
90
//
91
// inline friend double operator + (double p, const real_number<T>&q) { return p + q.t; }
92
// inline friend double operator - (double p, const real_number<T>&q) { return p - q.t; }
93
// inline friend double operator * (double p, const real_number<T>&q) { return p * q.t; }
94
// inline friend double operator / (double p, const real_number<T>&q) { return p / q.t; }
95
//
96
// inline friend double operator = (double p, const real_number<T>&q) { p = q.t; return p; }
97
// inline friend float operator = (float p, const real_number<T>&q) { p = q.t; return p; }
98
//
99
// inline friend std::ostream& operator << (std::ostream& os, const real_number<T>&p) { os << p.t; return os; }
100
// inline friend std::ostream& operator >> (std::ostream& os, const real_number<T>&p) { os >> p.t; return os; }
101
//};
102
103
//typedef real_number<double> real;
104
//typedef real_number<float> real_t;
105
106
};
107
108
#endif // !__real_h
oph
Definition:
Bitmap.h:49
D:
Sources
Openholo
Openholo
build
include
real.h
Generated by
1.8.14