operator_cube_relational.hpp
Go to the documentation of this file.
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 
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
31 operator<
33  {
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
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  {
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
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  {
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
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  {
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
83 operator==
85  {
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
96 operator!=
98  {
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
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  {
119 
121  }
122 
123 
124 
125 template<typename T1>
126 inline
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  {
132 
134  }
135 
136 
137 
138 template<typename T1>
139 inline
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  {
145 
147  }
148 
149 
150 
151 template<typename T1>
152 inline
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  {
158 
160  }
161 
162 
163 
164 template<typename T1>
165 inline
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  {
171 
172  return mtOpCube<uword, T1, op_rel_lteq_pre>(X.get_ref(), val);
173  }
174 
175 
176 
177 template<typename T1>
178 inline
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  {
184 
185  return mtOpCube<uword, T1, op_rel_lteq_post>(X.get_ref(), val);
186  }
187 
188 
189 
190 template<typename T1>
191 inline
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  {
197 
198  return mtOpCube<uword, T1, op_rel_gteq_pre>(X.get_ref(), val);
199  }
200 
201 
202 
203 template<typename T1>
204 inline
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  {
210 
211  return mtOpCube<uword, T1, op_rel_gteq_post>(X.get_ref(), val);
212  }
213 
214 
215 
216 template<typename T1>
217 inline
219 operator==
220 (const typename T1::elem_type val, const BaseCube<typename T1::elem_type,T1>& X)
221  {
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  {
236 
237  return mtOpCube<uword, T1, op_rel_eq>(X.get_ref(), val);
238  }
239 
240 
241 
242 template<typename T1>
243 inline
245 operator!=
246 (const typename T1::elem_type val, const BaseCube<typename T1::elem_type,T1>& X)
247  {
249 
251  }
252 
253 
254 
255 template<typename T1>
256 inline
258 operator!=
259 (const BaseCube<typename T1::elem_type,T1>& X, const typename T1::elem_type val)
260  {
262 
264  }
265 
266 
267 
#define arma_extra_debug_sigprint
Definition: debug.hpp:1116
Analog of the Base class, intended for cubes.
arma_inline const derived & get_ref() const


armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:58