operator_relational.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2010 NICTA and the authors listed below
00002 // http://nicta.com.au
00003 // 
00004 // Authors:
00005 // - Conrad Sanderson (conradsand at ieee dot org)
00006 // 
00007 // This file is part of the Armadillo C++ library.
00008 // It is provided without any warranty of fitness
00009 // for any purpose. You can redistribute this file
00010 // and/or modify it under the terms of the GNU
00011 // Lesser General Public License (LGPL) as published
00012 // by the Free Software Foundation, either version 3
00013 // of the License or (at your option) any later version.
00014 // (see http://www.opensource.org/licenses for more info)
00015 
00016 
00017 //! \addtogroup operator_relational
00018 //! @{
00019 
00020 
00021 // <  : lt
00022 // >  : gt
00023 // <= : lteq
00024 // >= : gteq
00025 // == : eq
00026 // != : noteq
00027 
00028 
00029 
00030 template<typename T1, typename T2>
00031 inline
00032 const mtGlue<u32, T1, T2, glue_rel_lt>
00033 operator<
00034 (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)
00035   {
00036   arma_extra_debug_sigprint();
00037   
00038   return mtGlue<u32, T1, T2, glue_rel_lt>( X.get_ref(), Y.get_ref() );
00039   }
00040 
00041 
00042 
00043 template<typename T1, typename T2>
00044 inline
00045 const mtGlue<u32, T1, T2, glue_rel_gt>
00046 operator>
00047 (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)
00048   {
00049   arma_extra_debug_sigprint();
00050   
00051   return mtGlue<u32, T1, T2, glue_rel_gt>( X.get_ref(), Y.get_ref() );
00052   }
00053 
00054 
00055 
00056 template<typename T1, typename T2>
00057 inline
00058 const mtGlue<u32, T1, T2, glue_rel_lteq>
00059 operator<=
00060 (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)
00061   {
00062   arma_extra_debug_sigprint();
00063   
00064   return mtGlue<u32, T1, T2, glue_rel_lteq>( X.get_ref(), Y.get_ref() );
00065   }
00066 
00067 
00068 
00069 template<typename T1, typename T2>
00070 inline
00071 const mtGlue<u32, T1, T2, glue_rel_gteq>
00072 operator>=
00073 (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)
00074   {
00075   arma_extra_debug_sigprint();
00076   
00077   return mtGlue<u32, T1, T2, glue_rel_gteq>( X.get_ref(), Y.get_ref() );
00078   }
00079 
00080 
00081 
00082 template<typename T1, typename T2>
00083 inline
00084 const mtGlue<u32, T1, T2, glue_rel_eq>
00085 operator==
00086 (const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T2>& Y)
00087   {
00088   arma_extra_debug_sigprint();
00089   
00090   return mtGlue<u32, T1, T2, glue_rel_eq>( X.get_ref(), Y.get_ref() );
00091   }
00092 
00093 
00094 
00095 template<typename T1, typename T2>
00096 inline
00097 const mtGlue<u32, T1, T2, glue_rel_noteq>
00098 operator!=
00099 (const Base<typename T1::elem_type,T1>& X, const Base<typename T1::elem_type,T2>& Y)
00100   {
00101   arma_extra_debug_sigprint();
00102   
00103   return mtGlue<u32, T1, T2, glue_rel_noteq>( X.get_ref(), Y.get_ref() );
00104   }
00105 
00106 
00107 
00108 //
00109 //
00110 //
00111 
00112 
00113 
00114 template<typename T1>
00115 inline
00116 const mtOp<u32, T1, op_rel_lt_pre>
00117 operator<
00118 (const typename arma_not_cx<typename T1::elem_type>::result val, const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
00119   {
00120   arma_extra_debug_sigprint();
00121   
00122   return mtOp<u32, T1, op_rel_lt_pre>(X.get_ref(), val);
00123   }
00124 
00125 
00126 
00127 template<typename T1>
00128 inline
00129 const mtOp<u32, T1, op_rel_lt_post>
00130 operator<
00131 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
00132   {
00133   arma_extra_debug_sigprint();
00134   
00135   return mtOp<u32, T1, op_rel_lt_post>(X.get_ref(), val);
00136   }
00137 
00138 
00139 
00140 template<typename T1>
00141 inline
00142 const mtOp<u32, T1, op_rel_gt_pre>
00143 operator>
00144 (const typename arma_not_cx<typename T1::elem_type>::result val, const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
00145   {
00146   arma_extra_debug_sigprint();
00147   
00148   return mtOp<u32, T1, op_rel_gt_pre>(X.get_ref(), val);
00149   }
00150 
00151 
00152 
00153 template<typename T1>
00154 inline
00155 const mtOp<u32, T1, op_rel_gt_post>
00156 operator>
00157 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
00158   {
00159   arma_extra_debug_sigprint();
00160   
00161   return mtOp<u32, T1, op_rel_gt_post>(X.get_ref(), val);
00162   }
00163 
00164 
00165 
00166 template<typename T1>
00167 inline
00168 const mtOp<u32, T1, op_rel_lteq_pre>
00169 operator<=
00170 (const typename arma_not_cx<typename T1::elem_type>::result val, const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
00171   {
00172   arma_extra_debug_sigprint();
00173   
00174   return mtOp<u32, T1, op_rel_lteq_pre>(X.get_ref(), val);
00175   }
00176 
00177 
00178 
00179 template<typename T1>
00180 inline
00181 const mtOp<u32, T1, op_rel_lteq_post>
00182 operator<=
00183 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
00184   {
00185   arma_extra_debug_sigprint();
00186   
00187   return mtOp<u32, T1, op_rel_lteq_post>(X.get_ref(), val);
00188   }
00189 
00190 
00191 
00192 template<typename T1>
00193 inline
00194 const mtOp<u32, T1, op_rel_gteq_pre>
00195 operator>=
00196 (const typename arma_not_cx<typename T1::elem_type>::result val, const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X)
00197   {
00198   arma_extra_debug_sigprint();
00199   
00200   return mtOp<u32, T1, op_rel_gteq_pre>(X.get_ref(), val);
00201   }
00202 
00203 
00204 
00205 template<typename T1>
00206 inline
00207 const mtOp<u32, T1, op_rel_gteq_post>
00208 operator>=
00209 (const Base<typename arma_not_cx<typename T1::elem_type>::result,T1>& X, const typename arma_not_cx<typename T1::elem_type>::result val)
00210   {
00211   arma_extra_debug_sigprint();
00212   
00213   return mtOp<u32, T1, op_rel_gteq_post>(X.get_ref(), val);
00214   }
00215 
00216 
00217 
00218 template<typename T1>
00219 inline
00220 const mtOp<u32, T1, op_rel_eq>
00221 operator==
00222 (const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X)
00223   {
00224   arma_extra_debug_sigprint();
00225   
00226   return mtOp<u32, T1, op_rel_eq>(X.get_ref(), val);
00227   }
00228 
00229 
00230 
00231 template<typename T1>
00232 inline
00233 const mtOp<u32, T1, op_rel_eq>
00234 operator==
00235 (const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val)
00236   {
00237   arma_extra_debug_sigprint();
00238   
00239   return mtOp<u32, T1, op_rel_eq>(X.get_ref(), val);
00240   }
00241 
00242 
00243 
00244 template<typename T1>
00245 inline
00246 const mtOp<u32, T1, op_rel_noteq>
00247 operator!=
00248 (const typename T1::elem_type val, const Base<typename T1::elem_type,T1>& X)
00249   {
00250   arma_extra_debug_sigprint();
00251   
00252   return mtOp<u32, T1, op_rel_noteq>(X.get_ref(), val);
00253   }
00254 
00255 
00256 
00257 template<typename T1>
00258 inline
00259 const mtOp<u32, T1, op_rel_noteq>
00260 operator!=
00261 (const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type val)
00262   {
00263   arma_extra_debug_sigprint();
00264   
00265   return mtOp<u32, T1, op_rel_noteq>(X.get_ref(), val);
00266   }
00267 
00268 
00269 
00270 //! @}