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