Chris@49
|
1 // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
|
Chris@49
|
2 // Copyright (C) 2009-2010 Conrad Sanderson
|
Chris@49
|
3 //
|
Chris@49
|
4 // This Source Code Form is subject to the terms of the Mozilla Public
|
Chris@49
|
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
|
Chris@49
|
6 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
Chris@49
|
7
|
Chris@49
|
8
|
Chris@49
|
9 //! \addtogroup operator_cube_relational
|
Chris@49
|
10 //! @{
|
Chris@49
|
11
|
Chris@49
|
12
|
Chris@49
|
13
|
Chris@49
|
14 // < : lt
|
Chris@49
|
15 // > : gt
|
Chris@49
|
16 // <= : lteq
|
Chris@49
|
17 // >= : gteq
|
Chris@49
|
18 // == : eq
|
Chris@49
|
19 // != : noteq
|
Chris@49
|
20
|
Chris@49
|
21
|
Chris@49
|
22
|
Chris@49
|
23 template<typename T1, typename T2>
|
Chris@49
|
24 inline
|
Chris@49
|
25 const mtGlueCube<uword, T1, T2, glue_rel_lt>
|
Chris@49
|
26 operator<
|
Chris@49
|
27 (const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
|
Chris@49
|
28 {
|
Chris@49
|
29 arma_extra_debug_sigprint();
|
Chris@49
|
30
|
Chris@49
|
31 return mtGlueCube<uword, T1, T2, glue_rel_lt>( X.get_ref(), Y.get_ref() );
|
Chris@49
|
32 }
|
Chris@49
|
33
|
Chris@49
|
34
|
Chris@49
|
35
|
Chris@49
|
36 template<typename T1, typename T2>
|
Chris@49
|
37 inline
|
Chris@49
|
38 const mtGlueCube<uword, T1, T2, glue_rel_gt>
|
Chris@49
|
39 operator>
|
Chris@49
|
40 (const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
|
Chris@49
|
41 {
|
Chris@49
|
42 arma_extra_debug_sigprint();
|
Chris@49
|
43
|
Chris@49
|
44 return mtGlueCube<uword, T1, T2, glue_rel_gt>( X.get_ref(), Y.get_ref() );
|
Chris@49
|
45 }
|
Chris@49
|
46
|
Chris@49
|
47
|
Chris@49
|
48
|
Chris@49
|
49 template<typename T1, typename T2>
|
Chris@49
|
50 inline
|
Chris@49
|
51 const mtGlueCube<uword, T1, T2, glue_rel_lteq>
|
Chris@49
|
52 operator<=
|
Chris@49
|
53 (const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
|
Chris@49
|
54 {
|
Chris@49
|
55 arma_extra_debug_sigprint();
|
Chris@49
|
56
|
Chris@49
|
57 return mtGlueCube<uword, T1, T2, glue_rel_lteq>( X.get_ref(), Y.get_ref() );
|
Chris@49
|
58 }
|
Chris@49
|
59
|
Chris@49
|
60
|
Chris@49
|
61
|
Chris@49
|
62 template<typename T1, typename T2>
|
Chris@49
|
63 inline
|
Chris@49
|
64 const mtGlueCube<uword, T1, T2, glue_rel_gteq>
|
Chris@49
|
65 operator>=
|
Chris@49
|
66 (const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
|
Chris@49
|
67 {
|
Chris@49
|
68 arma_extra_debug_sigprint();
|
Chris@49
|
69
|
Chris@49
|
70 return mtGlueCube<uword, T1, T2, glue_rel_gteq>( X.get_ref(), Y.get_ref() );
|
Chris@49
|
71 }
|
Chris@49
|
72
|
Chris@49
|
73
|
Chris@49
|
74
|
Chris@49
|
75 template<typename T1, typename T2>
|
Chris@49
|
76 inline
|
Chris@49
|
77 const mtGlueCube<uword, T1, T2, glue_rel_eq>
|
Chris@49
|
78 operator==
|
Chris@49
|
79 (const BaseCube<typename T1::elem_type,T1>& X, const BaseCube<typename T1::elem_type,T2>& Y)
|
Chris@49
|
80 {
|
Chris@49
|
81 arma_extra_debug_sigprint();
|
Chris@49
|
82
|
Chris@49
|
83 return mtGlueCube<uword, T1, T2, glue_rel_eq>( X.get_ref(), Y.get_ref() );
|
Chris@49
|
84 }
|
Chris@49
|
85
|
Chris@49
|
86
|
Chris@49
|
87
|
Chris@49
|
88 template<typename T1, typename T2>
|
Chris@49
|
89 inline
|
Chris@49
|
90 const mtGlueCube<uword, T1, T2, glue_rel_noteq>
|
Chris@49
|
91 operator!=
|
Chris@49
|
92 (const BaseCube<typename T1::elem_type,T1>& X, const BaseCube<typename T1::elem_type,T2>& Y)
|
Chris@49
|
93 {
|
Chris@49
|
94 arma_extra_debug_sigprint();
|
Chris@49
|
95
|
Chris@49
|
96 return mtGlueCube<uword, T1, T2, glue_rel_noteq>( X.get_ref(), Y.get_ref() );
|
Chris@49
|
97 }
|
Chris@49
|
98
|
Chris@49
|
99
|
Chris@49
|
100
|
Chris@49
|
101 //
|
Chris@49
|
102 //
|
Chris@49
|
103 //
|
Chris@49
|
104
|
Chris@49
|
105
|
Chris@49
|
106
|
Chris@49
|
107 template<typename T1>
|
Chris@49
|
108 inline
|
Chris@49
|
109 const mtOpCube<uword, T1, op_rel_lt_pre>
|
Chris@49
|
110 operator<
|
Chris@49
|
111 (const typename arma_not_cx<typename T1::elem_type>::result val, const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
|
Chris@49
|
112 {
|
Chris@49
|
113 arma_extra_debug_sigprint();
|
Chris@49
|
114
|
Chris@49
|
115 return mtOpCube<uword, T1, op_rel_lt_pre>(X.get_ref(), val);
|
Chris@49
|
116 }
|
Chris@49
|
117
|
Chris@49
|
118
|
Chris@49
|
119
|
Chris@49
|
120 template<typename T1>
|
Chris@49
|
121 inline
|
Chris@49
|
122 const mtOpCube<uword, T1, op_rel_lt_post>
|
Chris@49
|
123 operator<
|
Chris@49
|
124 (const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
|
Chris@49
|
125 {
|
Chris@49
|
126 arma_extra_debug_sigprint();
|
Chris@49
|
127
|
Chris@49
|
128 return mtOpCube<uword, T1, op_rel_lt_post>(X.get_ref(), val);
|
Chris@49
|
129 }
|
Chris@49
|
130
|
Chris@49
|
131
|
Chris@49
|
132
|
Chris@49
|
133 template<typename T1>
|
Chris@49
|
134 inline
|
Chris@49
|
135 const mtOpCube<uword, T1, op_rel_gt_pre>
|
Chris@49
|
136 operator>
|
Chris@49
|
137 (const typename arma_not_cx<typename T1::elem_type>::result val, const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
|
Chris@49
|
138 {
|
Chris@49
|
139 arma_extra_debug_sigprint();
|
Chris@49
|
140
|
Chris@49
|
141 return mtOpCube<uword, T1, op_rel_gt_pre>(X.get_ref(), val);
|
Chris@49
|
142 }
|
Chris@49
|
143
|
Chris@49
|
144
|
Chris@49
|
145
|
Chris@49
|
146 template<typename T1>
|
Chris@49
|
147 inline
|
Chris@49
|
148 const mtOpCube<uword, T1, op_rel_gt_post>
|
Chris@49
|
149 operator>
|
Chris@49
|
150 (const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
|
Chris@49
|
151 {
|
Chris@49
|
152 arma_extra_debug_sigprint();
|
Chris@49
|
153
|
Chris@49
|
154 return mtOpCube<uword, T1, op_rel_gt_post>(X.get_ref(), val);
|
Chris@49
|
155 }
|
Chris@49
|
156
|
Chris@49
|
157
|
Chris@49
|
158
|
Chris@49
|
159 template<typename T1>
|
Chris@49
|
160 inline
|
Chris@49
|
161 const mtOpCube<uword, T1, op_rel_lteq_pre>
|
Chris@49
|
162 operator<=
|
Chris@49
|
163 (const typename arma_not_cx<typename T1::elem_type>::result val, const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
|
Chris@49
|
164 {
|
Chris@49
|
165 arma_extra_debug_sigprint();
|
Chris@49
|
166
|
Chris@49
|
167 return mtOpCube<uword, T1, op_rel_lteq_pre>(X.get_ref(), val);
|
Chris@49
|
168 }
|
Chris@49
|
169
|
Chris@49
|
170
|
Chris@49
|
171
|
Chris@49
|
172 template<typename T1>
|
Chris@49
|
173 inline
|
Chris@49
|
174 const mtOpCube<uword, T1, op_rel_lteq_post>
|
Chris@49
|
175 operator<=
|
Chris@49
|
176 (const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
|
Chris@49
|
177 {
|
Chris@49
|
178 arma_extra_debug_sigprint();
|
Chris@49
|
179
|
Chris@49
|
180 return mtOpCube<uword, T1, op_rel_lteq_post>(X.get_ref(), val);
|
Chris@49
|
181 }
|
Chris@49
|
182
|
Chris@49
|
183
|
Chris@49
|
184
|
Chris@49
|
185 template<typename T1>
|
Chris@49
|
186 inline
|
Chris@49
|
187 const mtOpCube<uword, T1, op_rel_gteq_pre>
|
Chris@49
|
188 operator>=
|
Chris@49
|
189 (const typename arma_not_cx<typename T1::elem_type>::result val, const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
|
Chris@49
|
190 {
|
Chris@49
|
191 arma_extra_debug_sigprint();
|
Chris@49
|
192
|
Chris@49
|
193 return mtOpCube<uword, T1, op_rel_gteq_pre>(X.get_ref(), val);
|
Chris@49
|
194 }
|
Chris@49
|
195
|
Chris@49
|
196
|
Chris@49
|
197
|
Chris@49
|
198 template<typename T1>
|
Chris@49
|
199 inline
|
Chris@49
|
200 const mtOpCube<uword, T1, op_rel_gteq_post>
|
Chris@49
|
201 operator>=
|
Chris@49
|
202 (const BaseCube<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
|
Chris@49
|
203 {
|
Chris@49
|
204 arma_extra_debug_sigprint();
|
Chris@49
|
205
|
Chris@49
|
206 return mtOpCube<uword, T1, op_rel_gteq_post>(X.get_ref(), val);
|
Chris@49
|
207 }
|
Chris@49
|
208
|
Chris@49
|
209
|
Chris@49
|
210
|
Chris@49
|
211 template<typename T1>
|
Chris@49
|
212 inline
|
Chris@49
|
213 const mtOpCube<uword, T1, op_rel_eq>
|
Chris@49
|
214 operator==
|
Chris@49
|
215 (const typename T1::elem_type val, const BaseCube<typename T1::elem_type,T1>& X)
|
Chris@49
|
216 {
|
Chris@49
|
217 arma_extra_debug_sigprint();
|
Chris@49
|
218
|
Chris@49
|
219 return mtOpCube<uword, T1, op_rel_eq>(X.get_ref(), val);
|
Chris@49
|
220 }
|
Chris@49
|
221
|
Chris@49
|
222
|
Chris@49
|
223
|
Chris@49
|
224 template<typename T1>
|
Chris@49
|
225 inline
|
Chris@49
|
226 const mtOpCube<uword, T1, op_rel_eq>
|
Chris@49
|
227 operator==
|
Chris@49
|
228 (const BaseCube<typename T1::elem_type,T1>& X, const typename T1::elem_type val)
|
Chris@49
|
229 {
|
Chris@49
|
230 arma_extra_debug_sigprint();
|
Chris@49
|
231
|
Chris@49
|
232 return mtOpCube<uword, T1, op_rel_eq>(X.get_ref(), val);
|
Chris@49
|
233 }
|
Chris@49
|
234
|
Chris@49
|
235
|
Chris@49
|
236
|
Chris@49
|
237 template<typename T1>
|
Chris@49
|
238 inline
|
Chris@49
|
239 const mtOpCube<uword, T1, op_rel_noteq>
|
Chris@49
|
240 operator!=
|
Chris@49
|
241 (const typename T1::elem_type val, const BaseCube<typename T1::elem_type,T1>& X)
|
Chris@49
|
242 {
|
Chris@49
|
243 arma_extra_debug_sigprint();
|
Chris@49
|
244
|
Chris@49
|
245 return mtOpCube<uword, T1, op_rel_noteq>(X.get_ref(), val);
|
Chris@49
|
246 }
|
Chris@49
|
247
|
Chris@49
|
248
|
Chris@49
|
249
|
Chris@49
|
250 template<typename T1>
|
Chris@49
|
251 inline
|
Chris@49
|
252 const mtOpCube<uword, T1, op_rel_noteq>
|
Chris@49
|
253 operator!=
|
Chris@49
|
254 (const BaseCube<typename T1::elem_type,T1>& X, const typename T1::elem_type val)
|
Chris@49
|
255 {
|
Chris@49
|
256 arma_extra_debug_sigprint();
|
Chris@49
|
257
|
Chris@49
|
258 return mtOpCube<uword, T1, op_rel_noteq>(X.get_ref(), val);
|
Chris@49
|
259 }
|
Chris@49
|
260
|
Chris@49
|
261
|
Chris@49
|
262
|
Chris@49
|
263 //! @}
|