operator_cube_minus.hpp
Go to the documentation of this file.
00001 // Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
00002 // Copyright (C) 2008-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 eOpCube<T1, eop_neg>
00023 operator-
00024   (
00025   const BaseCube<typename T1::elem_type,T1>& X
00026   )
00027   {
00028   arma_extra_debug_sigprint();
00029   
00030   return eOpCube<T1, eop_neg>(X.get_ref());
00031   }
00032 
00033 
00034 
00036 template<typename T1>
00037 arma_inline
00038 const T1&
00039 operator-
00040   (
00041   const eOpCube<T1, eop_neg>& X
00042   )
00043   {
00044   arma_extra_debug_sigprint();
00045   
00046   return X.m;
00047   }
00048 
00049 
00050 
00052 template<typename T1>
00053 arma_inline
00054 const eOpCube<T1, eop_scalar_minus_post>
00055 operator-
00056   (
00057   const BaseCube<typename T1::elem_type,T1>& X,
00058   const typename T1::elem_type               k
00059   )
00060   {
00061   arma_extra_debug_sigprint();
00062   
00063   return eOpCube<T1, eop_scalar_minus_post>(X.get_ref(), k);
00064   }
00065 
00066 
00067 
00069 template<typename T1>
00070 arma_inline
00071 const eOpCube<T1, eop_scalar_minus_pre>
00072 operator-
00073   (
00074   const typename T1::elem_type               k,
00075   const BaseCube<typename T1::elem_type,T1>& X
00076   )
00077   {
00078   arma_extra_debug_sigprint();
00079   
00080   return eOpCube<T1, eop_scalar_minus_pre>(X.get_ref(), k);
00081   }
00082 
00083 
00084 
00086 template<typename T1>
00087 arma_inline
00088 const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_pre>
00089 operator-
00090   (
00091   const std::complex<typename T1::pod_type>& k,
00092   const BaseCube<typename T1::pod_type, T1>& X
00093   )
00094   {
00095   arma_extra_debug_sigprint();
00096   
00097   return mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_pre>('j', X.get_ref(), k);
00098   }
00099 
00100 
00101 
00103 template<typename T1>
00104 arma_inline
00105 const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_post>
00106 operator-
00107   (
00108   const BaseCube<typename T1::pod_type, T1>& X,
00109   const std::complex<typename T1::pod_type>& k
00110   )
00111   {
00112   arma_extra_debug_sigprint();
00113   
00114   return mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_post>('j', X.get_ref(), k);
00115   }
00116 
00117 
00118 
00120 template<typename T1, typename T2>
00121 arma_inline
00122 const eGlueCube<T1, T2, eglue_minus>
00123 operator-
00124   (
00125   const BaseCube<typename T1::elem_type,T1>& X,
00126   const BaseCube<typename T1::elem_type,T2>& Y
00127   )
00128   {
00129   arma_extra_debug_sigprint();
00130   
00131   return eGlueCube<T1, T2, eglue_minus>(X.get_ref(), Y.get_ref());
00132   }
00133 
00134 
00135 
00137 template<typename T1, typename T2>
00138 inline
00139 const mtGlueCube<typename promote_type<typename T1::elem_type, typename T2::elem_type>::result, T1, T2, glue_mixed_minus>
00140 operator-
00141   (
00142   const BaseCube< typename force_different_type<typename T1::elem_type, typename T2::elem_type>::T1_result, T1>& X,
00143   const BaseCube< typename force_different_type<typename T1::elem_type, typename T2::elem_type>::T2_result, T2>& Y
00144   )
00145   {
00146   arma_extra_debug_sigprint();
00147   
00148   typedef typename T1::elem_type eT1;
00149   typedef typename T2::elem_type eT2;
00150   
00151   typedef typename promote_type<eT1,eT2>::result out_eT;
00152   
00153   promote_type<eT1,eT2>::check();
00154   
00155   return mtGlueCube<out_eT, T1, T2, glue_mixed_minus>( X.get_ref(), Y.get_ref() );
00156   }
00157 
00158 
00159 


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