operator_div.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2009-2010 NICTA (www.nicta.com.au)
00002 // Copyright (C) 2009-2010 Conrad Sanderson
00003 // 
00004 // This file is part of the Armadillo C++ library.
00005 // It is provided without any warranty of fitness
00006 // for any purpose. You can redistribute this file
00007 // and/or modify it under the terms of the GNU
00008 // Lesser General Public License (LGPL) as published
00009 // by the Free Software Foundation, either version 3
00010 // of the License or (at your option) any later version.
00011 // (see http://www.opensource.org/licenses for more info)
00012 
00013 
00016 
00017 
00018 
00020 template<typename T1>
00021 arma_inline
00022 const eOp<T1, eop_scalar_div_post>
00023 operator/
00024   (
00025   const Base<typename T1::elem_type,T1>& X,
00026   const typename T1::elem_type           k
00027   )
00028   {
00029   arma_extra_debug_sigprint();
00030   
00031   return eOp<T1, eop_scalar_div_post>(X.get_ref(), k);
00032   }
00033 
00034 
00035 
00037 template<typename T1>
00038 arma_inline
00039 const eOp<T1, eop_scalar_div_pre>
00040 operator/
00041   (
00042   const typename T1::elem_type           k,
00043   const Base<typename T1::elem_type,T1>& X
00044   )
00045   {
00046   arma_extra_debug_sigprint();
00047   
00048   return eOp<T1, eop_scalar_div_pre>(X.get_ref(), k);
00049   }
00050 
00051 
00052 
00054 template<typename T1>
00055 arma_inline
00056 const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_div_pre>
00057 operator/
00058   (
00059   const std::complex<typename T1::pod_type>& k,
00060   const Base<typename T1::pod_type, T1>&     X
00061   )
00062   {
00063   arma_extra_debug_sigprint();
00064   
00065   return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_div_pre>('j', X.get_ref(), k);
00066   }
00067 
00068 
00069 
00071 template<typename T1>
00072 arma_inline
00073 const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_div_post>
00074 operator/
00075   (
00076   const Base<typename T1::pod_type, T1>&     X,
00077   const std::complex<typename T1::pod_type>& k
00078   )
00079   {
00080   arma_extra_debug_sigprint();
00081   
00082   return mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_div_post>('j', X.get_ref(), k);
00083   }
00084 
00085 
00086 
00088 template<typename T1, typename T2>
00089 arma_inline
00090 const eGlue<T1, T2, eglue_div>
00091 operator/
00092   (
00093   const Base<typename T1::elem_type,T1>& X,
00094   const Base<typename T1::elem_type,T2>& Y
00095   )
00096   {
00097   arma_extra_debug_sigprint();
00098   
00099   return eGlue<T1, T2, eglue_div>(X.get_ref(), Y.get_ref());
00100   }
00101 
00102 
00103 
00105 template<typename T1, typename T2>
00106 inline
00107 const mtGlue<typename promote_type<typename T1::elem_type, typename T2::elem_type>::result, T1, T2, glue_mixed_div>
00108 operator/
00109   (
00110   const Base< typename force_different_type<typename T1::elem_type, typename T2::elem_type>::T1_result, T1>& X,
00111   const Base< typename force_different_type<typename T1::elem_type, typename T2::elem_type>::T2_result, T2>& Y
00112   )
00113   {
00114   arma_extra_debug_sigprint();
00115   
00116   typedef typename T1::elem_type eT1;
00117   typedef typename T2::elem_type eT2;
00118   
00119   typedef typename promote_type<eT1,eT2>::result out_eT;
00120   
00121   promote_type<eT1,eT2>::check();
00122   
00123   return mtGlue<out_eT, T1, T2, glue_mixed_div>( X.get_ref(), Y.get_ref() );
00124   }
00125 
00126 
00127 


armadillo_matrix
Author(s): Conrad Sanderson - NICTA (www.nicta.com.au), (Wrapper by Sjoerd van den Dries)
autogenerated on Tue Jan 7 2014 11:42:05