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