op_trig_proto.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2009 NICTA
00002 // 
00003 // Authors:
00004 // - Conrad Sanderson (conradsand at ieee dot org)
00005 // 
00006 // This file is part of the Armadillo C++ library.
00007 // It is provided without any warranty of fitness
00008 // for any purpose. You can redistribute this file
00009 // and/or modify it under the terms of the GNU
00010 // Lesser General Public License (LGPL) as published
00011 // by the Free Software Foundation, either version 3
00012 // of the License or (at your option) any later version.
00013 // (see http://www.opensource.org/licenses for more info)
00014 
00015 
00016 
00017 //! \addtogroup op_trig
00018 //! @{
00019 
00020 
00021 //
00022 // trigonometric functions:
00023 // cos family: cos, acos, cosh, acosh
00024 // sin family: sin, asin, sinh, asinh
00025 // tan family: tan, atan, tanh, atanh
00026 
00027 // cos family
00028 
00029 class op_cos
00030   {
00031   public:
00032   
00033   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_cos>& in);
00034   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_cos>& in);
00035   };
00036 
00037 
00038 
00039 class op_acos
00040   {
00041   public:
00042 
00043   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_acos>& in);
00044   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_acos>& in);
00045 
00046   template<typename T, typename T1> inline static void apply( Mat< std::complex<T> >& out, const     Op<T1,op_acos>& in);
00047   template<typename T, typename T1> inline static void apply(Cube< std::complex<T> >& out, const OpCube<T1,op_acos>& in);
00048   };
00049 
00050 
00051 
00052 class op_cosh
00053   {
00054   public:
00055   
00056   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_cosh>& in);
00057   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_cosh>& in);
00058   };
00059   
00060 
00061 
00062 class op_acosh
00063   {
00064   public:
00065   
00066   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_acosh>& in);
00067   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_acosh>& in);
00068   
00069   template<typename T, typename T1> inline static void apply( Mat< std::complex<T> >& out, const     Op<T1,op_acosh>& in);
00070   template<typename T, typename T1> inline static void apply(Cube< std::complex<T> >& out, const OpCube<T1,op_acosh>& in);
00071   };
00072   
00073 
00074 
00075 // sin family
00076 
00077 class op_sin
00078   {
00079   public:
00080   
00081   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_sin>& in);
00082   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_sin>& in);
00083   };
00084 
00085 
00086 
00087 class op_asin
00088   {
00089   public:
00090   
00091   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_asin>& in);
00092   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_asin>& in);
00093   
00094   template<typename T, typename T1> inline static void apply( Mat< std::complex<T> >& out, const     Op<T1,op_asin>& in);
00095   template<typename T, typename T1> inline static void apply(Cube< std::complex<T> >& out, const OpCube<T1,op_asin>& in);
00096   };
00097 
00098 
00099 
00100 class op_sinh
00101   {
00102   public:
00103   
00104   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_sinh>& in);
00105   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_sinh>& in);
00106   };
00107   
00108 
00109 
00110 class op_asinh
00111   {
00112   public:
00113   
00114   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_asinh>& in);
00115   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_asinh>& in);
00116   };
00117 
00118 
00119 
00120 // tan family
00121 
00122 class op_tan
00123   {
00124   public:
00125   
00126   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_tan>& in);
00127   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_tan>& in);
00128   };
00129 
00130 
00131 
00132 class op_atan
00133   {
00134   public:
00135   
00136   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_atan>& in);
00137   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_atan>& in);
00138   
00139   template<typename T, typename T1> inline static void apply( Mat< std::complex<T> >& out, const     Op<T1,op_atan>& in);
00140   template<typename T, typename T1> inline static void apply(Cube< std::complex<T> >& out, const OpCube<T1,op_atan>& in);
00141   };
00142 
00143 
00144 
00145 class op_tanh
00146   {
00147   public:
00148   
00149   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_tanh>& in);
00150   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_tanh>& in);
00151   };
00152   
00153 
00154 
00155 class op_atanh
00156   {
00157   public:
00158   
00159   template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const     Op<T1,op_atanh>& in);
00160   template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_atanh>& in);
00161   };
00162 
00163 
00164 //! @}