eop_cube_core_proto.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 eop_cube_core
00018 //! @{
00019 
00020 
00021 
00022 template<typename eop_cube_type>
00023 class eop_cube_core
00024   {
00025   public:
00026   
00027   template<typename T1> arma_hot arma_inline static typename T1::elem_type get_elem(const eOpCube<T1, eop_cube_type>& x, const u32 i);
00028   template<typename T1> arma_hot arma_inline static typename T1::elem_type get_elem(const eOpCube<T1, eop_cube_type>& x, const u32 row, const u32 col, const u32 slice);
00029   
00030   template<typename T1> arma_hot arma_inline static typename T1::elem_type process(const eOpCube<T1, eop_cube_type>& x, const typename T1::elem_type val);
00031   
00032   template<typename T1> arma_hot arma_inline static void apply(Cube<typename T1::elem_type>& out, const eOpCube<T1, eop_cube_type>& x);
00033   
00034   template<typename T1> arma_hot inline static void apply_proxy (Cube<typename T1::elem_type>& out, const eOpCube<T1, eop_cube_type>& x);
00035   template<typename T1> arma_hot inline static void apply_unwrap(Cube<typename T1::elem_type>& out, const eOpCube<T1, eop_cube_type>& x);
00036   
00037   template<typename T1> arma_hot inline static void apply_inplace_plus (Cube<typename T1::elem_type>& out, const eOpCube<T1, eop_cube_type>& x);
00038   template<typename T1> arma_hot inline static void apply_inplace_minus(Cube<typename T1::elem_type>& out, const eOpCube<T1, eop_cube_type>& x);
00039   template<typename T1> arma_hot inline static void apply_inplace_schur(Cube<typename T1::elem_type>& out, const eOpCube<T1, eop_cube_type>& x);
00040   template<typename T1> arma_hot inline static void apply_inplace_div  (Cube<typename T1::elem_type>& out, const eOpCube<T1, eop_cube_type>& x);
00041 
00042   };
00043 
00044 
00045 
00046 class eop_cube_neg               : public eop_cube_core<eop_cube_neg>               {};
00047 class eop_cube_scalar_plus       : public eop_cube_core<eop_cube_scalar_plus>       {};
00048 class eop_cube_scalar_minus_pre  : public eop_cube_core<eop_cube_scalar_minus_pre>  {};
00049 class eop_cube_scalar_minus_post : public eop_cube_core<eop_cube_scalar_minus_post> {};
00050 class eop_cube_scalar_times      : public eop_cube_core<eop_cube_scalar_times>      {};
00051 class eop_cube_scalar_div_pre    : public eop_cube_core<eop_cube_scalar_div_pre>    {};
00052 class eop_cube_scalar_div_post   : public eop_cube_core<eop_cube_scalar_div_post>   {};
00053 class eop_cube_square            : public eop_cube_core<eop_cube_square>            {};
00054 class eop_cube_sqrt              : public eop_cube_core<eop_cube_sqrt>              {};
00055 class eop_cube_log10             : public eop_cube_core<eop_cube_log10>             {};
00056 class eop_cube_log               : public eop_cube_core<eop_cube_log>               {};
00057 class eop_cube_trunc_log         : public eop_cube_core<eop_cube_trunc_log>         {};
00058 class eop_cube_exp               : public eop_cube_core<eop_cube_exp>               {};
00059 class eop_cube_trunc_exp         : public eop_cube_core<eop_cube_trunc_exp>         {};
00060 class eop_cube_cos               : public eop_cube_core<eop_cube_cos>               {};
00061 class eop_cube_cosh              : public eop_cube_core<eop_cube_cosh>              {};
00062 class eop_cube_acos              : public eop_cube_core<eop_cube_acos>              {};
00063 class eop_cube_acosh             : public eop_cube_core<eop_cube_acosh>             {};
00064 class eop_cube_sin               : public eop_cube_core<eop_cube_sin>               {};
00065 class eop_cube_sinh              : public eop_cube_core<eop_cube_sinh>              {};
00066 class eop_cube_asin              : public eop_cube_core<eop_cube_asin>              {};
00067 class eop_cube_asinh             : public eop_cube_core<eop_cube_asinh>             {};
00068 class eop_cube_tan               : public eop_cube_core<eop_cube_tan>               {};
00069 class eop_cube_tanh              : public eop_cube_core<eop_cube_tanh>              {};
00070 class eop_cube_atan              : public eop_cube_core<eop_cube_atan>              {};
00071 class eop_cube_atanh             : public eop_cube_core<eop_cube_atanh>             {};
00072 class eop_cube_eps               : public eop_cube_core<eop_cube_eps>               {};
00073 class eop_cube_abs               : public eop_cube_core<eop_cube_abs>               {};
00074 class eop_cube_conj              : public eop_cube_core<eop_cube_conj>              {};
00075 class eop_cube_pow               : public eop_cube_core<eop_cube_pow>               {};
00076 class eop_cube_pow_int           : public eop_cube_core<eop_cube_pow_int>           {};
00077 
00078 
00079 
00080 class eop_cube_ones_full : public eop_cube_core<eop_cube_ones_full> {};
00081 class eop_cube_randu     : public eop_cube_core<eop_cube_randu>     {};
00082 class eop_cube_randn     : public eop_cube_core<eop_cube_randn>     {};
00083 class eop_cube_zeros     : public eop_cube_core<eop_cube_zeros>     {};
00084 
00085 template<typename T1> struct is_cube_generator                     { static const bool value = false; };
00086 template<>            struct is_cube_generator<eop_cube_ones_full> { static const bool value = true;  };
00087 template<>            struct is_cube_generator<eop_cube_randu>     { static const bool value = true;  };
00088 template<>            struct is_cube_generator<eop_cube_randn>     { static const bool value = true;  };
00089 template<>            struct is_cube_generator<eop_cube_zeros>     { static const bool value = true;  };
00090 
00091 
00092 
00093 //! @}