annotate armadillo-2.4.4/include/armadillo_bits/operator_relational.hpp @ 18:8d046a9d36aa slimline

Back out rev 13:ac07c60aa798. Like an idiot, I committed a whole pile of unrelated changes in the guise of a single typo fix. Will re-commit in stages
author Chris Cannam
date Thu, 10 May 2012 10:45:44 +0100
parents 8b6102e2a9b0
children
rev   line source
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_relational
max@0 15 //! @{
max@0 16
max@0 17
max@0 18 // < : lt
max@0 19 // > : gt
max@0 20 // <= : lteq
max@0 21 // >= : gteq
max@0 22 // == : eq
max@0 23 // != : noteq
max@0 24
max@0 25
max@0 26
max@0 27 template<typename T1, typename T2>
max@0 28 inline
max@0 29 const mtGlue<uword, T1, T2, glue_rel_lt>
max@0 30 operator<
max@0 31 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const Base<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
max@0 32 {
max@0 33 arma_extra_debug_sigprint();
max@0 34
max@0 35 return mtGlue<uword, T1, T2, glue_rel_lt>( X.get_ref(), Y.get_ref() );
max@0 36 }
max@0 37
max@0 38
max@0 39
max@0 40 template<typename T1, typename T2>
max@0 41 inline
max@0 42 const mtGlue<uword, T1, T2, glue_rel_gt>
max@0 43 operator>
max@0 44 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const Base<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
max@0 45 {
max@0 46 arma_extra_debug_sigprint();
max@0 47
max@0 48 return mtGlue<uword, T1, T2, glue_rel_gt>( X.get_ref(), Y.get_ref() );
max@0 49 }
max@0 50
max@0 51
max@0 52
max@0 53 template<typename T1, typename T2>
max@0 54 inline
max@0 55 const mtGlue<uword, T1, T2, glue_rel_lteq>
max@0 56 operator<=
max@0 57 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const Base<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
max@0 58 {
max@0 59 arma_extra_debug_sigprint();
max@0 60
max@0 61 return mtGlue<uword, T1, T2, glue_rel_lteq>( X.get_ref(), Y.get_ref() );
max@0 62 }
max@0 63
max@0 64
max@0 65
max@0 66 template<typename T1, typename T2>
max@0 67 inline
max@0 68 const mtGlue<uword, T1, T2, glue_rel_gteq>
max@0 69 operator>=
max@0 70 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const Base<typename arma_not_cx<typename T1::elem_type>::result,T2>& Y)
max@0 71 {
max@0 72 arma_extra_debug_sigprint();
max@0 73
max@0 74 return mtGlue<uword, T1, T2, glue_rel_gteq>( X.get_ref(), Y.get_ref() );
max@0 75 }
max@0 76
max@0 77
max@0 78
max@0 79 template<typename T1, typename T2>
max@0 80 inline
max@0 81 const mtGlue<uword, T1, T2, glue_rel_eq>
max@0 82 operator==
max@0 83 (const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T2>& Y)
max@0 84 {
max@0 85 arma_extra_debug_sigprint();
max@0 86
max@0 87 return mtGlue<uword, T1, T2, glue_rel_eq>( X.get_ref(), Y.get_ref() );
max@0 88 }
max@0 89
max@0 90
max@0 91
max@0 92 template<typename T1, typename T2>
max@0 93 inline
max@0 94 const mtGlue<uword, T1, T2, glue_rel_noteq>
max@0 95 operator!=
max@0 96 (const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T2>& Y)
max@0 97 {
max@0 98 arma_extra_debug_sigprint();
max@0 99
max@0 100 return mtGlue<uword, T1, T2, glue_rel_noteq>( X.get_ref(), Y.get_ref() );
max@0 101 }
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 template<typename T1>
max@0 112 inline
max@0 113 const mtOp<uword, T1, op_rel_lt_pre>
max@0 114 operator<
max@0 115 (const typename arma_not_cx<typename T1::elem_type>::result val, const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
max@0 116 {
max@0 117 arma_extra_debug_sigprint();
max@0 118
max@0 119 return mtOp<uword, T1, op_rel_lt_pre>(X.get_ref(), val);
max@0 120 }
max@0 121
max@0 122
max@0 123
max@0 124 template<typename T1>
max@0 125 inline
max@0 126 const mtOp<uword, T1, op_rel_lt_post>
max@0 127 operator<
max@0 128 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
max@0 129 {
max@0 130 arma_extra_debug_sigprint();
max@0 131
max@0 132 return mtOp<uword, T1, op_rel_lt_post>(X.get_ref(), val);
max@0 133 }
max@0 134
max@0 135
max@0 136
max@0 137 template<typename T1>
max@0 138 inline
max@0 139 const mtOp<uword, T1, op_rel_gt_pre>
max@0 140 operator>
max@0 141 (const typename arma_not_cx<typename T1::elem_type>::result val, const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
max@0 142 {
max@0 143 arma_extra_debug_sigprint();
max@0 144
max@0 145 return mtOp<uword, T1, op_rel_gt_pre>(X.get_ref(), val);
max@0 146 }
max@0 147
max@0 148
max@0 149
max@0 150 template<typename T1>
max@0 151 inline
max@0 152 const mtOp<uword, T1, op_rel_gt_post>
max@0 153 operator>
max@0 154 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
max@0 155 {
max@0 156 arma_extra_debug_sigprint();
max@0 157
max@0 158 return mtOp<uword, T1, op_rel_gt_post>(X.get_ref(), val);
max@0 159 }
max@0 160
max@0 161
max@0 162
max@0 163 template<typename T1>
max@0 164 inline
max@0 165 const mtOp<uword, T1, op_rel_lteq_pre>
max@0 166 operator<=
max@0 167 (const typename arma_not_cx<typename T1::elem_type>::result val, const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
max@0 168 {
max@0 169 arma_extra_debug_sigprint();
max@0 170
max@0 171 return mtOp<uword, T1, op_rel_lteq_pre>(X.get_ref(), val);
max@0 172 }
max@0 173
max@0 174
max@0 175
max@0 176 template<typename T1>
max@0 177 inline
max@0 178 const mtOp<uword, T1, op_rel_lteq_post>
max@0 179 operator<=
max@0 180 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
max@0 181 {
max@0 182 arma_extra_debug_sigprint();
max@0 183
max@0 184 return mtOp<uword, T1, op_rel_lteq_post>(X.get_ref(), val);
max@0 185 }
max@0 186
max@0 187
max@0 188
max@0 189 template<typename T1>
max@0 190 inline
max@0 191 const mtOp<uword, T1, op_rel_gteq_pre>
max@0 192 operator>=
max@0 193 (const typename arma_not_cx<typename T1::elem_type>::result val, const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
max@0 194 {
max@0 195 arma_extra_debug_sigprint();
max@0 196
max@0 197 return mtOp<uword, T1, op_rel_gteq_pre>(X.get_ref(), val);
max@0 198 }
max@0 199
max@0 200
max@0 201
max@0 202 template<typename T1>
max@0 203 inline
max@0 204 const mtOp<uword, T1, op_rel_gteq_post>
max@0 205 operator>=
max@0 206 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
max@0 207 {
max@0 208 arma_extra_debug_sigprint();
max@0 209
max@0 210 return mtOp<uword, T1, op_rel_gteq_post>(X.get_ref(), val);
max@0 211 }
max@0 212
max@0 213
max@0 214
max@0 215 template<typename T1>
max@0 216 inline
max@0 217 const mtOp<uword, T1, op_rel_eq>
max@0 218 operator==
max@0 219 (const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X)
max@0 220 {
max@0 221 arma_extra_debug_sigprint();
max@0 222
max@0 223 return mtOp<uword, T1, op_rel_eq>(X.get_ref(), val);
max@0 224 }
max@0 225
max@0 226
max@0 227
max@0 228 template<typename T1>
max@0 229 inline
max@0 230 const mtOp<uword, T1, op_rel_eq>
max@0 231 operator==
max@0 232 (const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val)
max@0 233 {
max@0 234 arma_extra_debug_sigprint();
max@0 235
max@0 236 return mtOp<uword, T1, op_rel_eq>(X.get_ref(), val);
max@0 237 }
max@0 238
max@0 239
max@0 240
max@0 241 template<typename T1>
max@0 242 inline
max@0 243 const mtOp<uword, T1, op_rel_noteq>
max@0 244 operator!=
max@0 245 (const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X)
max@0 246 {
max@0 247 arma_extra_debug_sigprint();
max@0 248
max@0 249 return mtOp<uword, T1, op_rel_noteq>(X.get_ref(), val);
max@0 250 }
max@0 251
max@0 252
max@0 253
max@0 254 template<typename T1>
max@0 255 inline
max@0 256 const mtOp<uword, T1, op_rel_noteq>
max@0 257 operator!=
max@0 258 (const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val)
max@0 259 {
max@0 260 arma_extra_debug_sigprint();
max@0 261
max@0 262 return mtOp<uword, T1, op_rel_noteq>(X.get_ref(), val);
max@0 263 }
max@0 264
max@0 265
max@0 266
max@0 267 //! @}