fn_trig.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 fn_trig
00018 //! @{
00019 
00020 //
00021 // trigonometric functions:
00022 // cos family: cos, acos, cosh, acosh
00023 // sin family: sin, asin, sinh, asinh
00024 // tan family: tan, atan, tanh, atanh
00025 
00026 
00027 //
00028 // cos
00029 
00030 template<typename T1>
00031 arma_inline
00032 const eOp<T1, eop_cos>
00033 cos(const Base<typename T1::elem_type,T1>& A)
00034   {
00035   arma_extra_debug_sigprint();
00036   
00037   return eOp<T1, eop_cos>(A.get_ref());
00038   }
00039 
00040 
00041 
00042 template<typename T1>
00043 arma_inline
00044 const eOpCube<T1, eop_cube_cos>
00045 cos(const BaseCube<typename T1::elem_type,T1>& A)
00046   {
00047   arma_extra_debug_sigprint();
00048   
00049   return eOpCube<T1, eop_cube_cos>(A.get_ref());
00050   }
00051 
00052 
00053 
00054 //
00055 // acos
00056 
00057 template<typename T1>
00058 arma_inline
00059 const eOp<T1, eop_acos>
00060 acos(const Base<typename T1::elem_type,T1>& A)
00061   {
00062   arma_extra_debug_sigprint();
00063   
00064   return eOp<T1, eop_acos>(A.get_ref());
00065   }
00066 
00067 
00068 
00069 template<typename T1>
00070 arma_inline
00071 const eOpCube<T1, eop_cube_acos>
00072 acos(const BaseCube<typename T1::elem_type,T1>& A)
00073   {
00074   arma_extra_debug_sigprint();
00075   
00076   return eOpCube<T1, eop_cube_acos>(A.get_ref());
00077   }
00078 
00079 
00080 
00081 //
00082 // cosh
00083 
00084 template<typename T1>
00085 arma_inline
00086 const eOp<T1, eop_cosh>
00087 cosh(const Base<typename T1::elem_type,T1>& A)
00088   {
00089   arma_extra_debug_sigprint();
00090   
00091   return eOp<T1, eop_cosh>(A.get_ref());
00092   }
00093 
00094 
00095 
00096 template<typename T1>
00097 arma_inline
00098 const eOpCube<T1, eop_cube_cosh>
00099 cosh(const BaseCube<typename T1::elem_type,T1>& A)
00100   {
00101   arma_extra_debug_sigprint();
00102   
00103   return eOpCube<T1, eop_cube_cosh>(A.get_ref());
00104   }
00105 
00106 
00107 
00108 //
00109 // acosh
00110 
00111 template<typename T1>
00112 arma_inline
00113 const eOp<T1, eop_acosh>
00114 acosh(const Base<typename T1::elem_type,T1>& A)
00115   {
00116   arma_extra_debug_sigprint();
00117   
00118   return eOp<T1, eop_acosh>(A.get_ref());
00119   }
00120 
00121 
00122 
00123 template<typename T1>
00124 arma_inline
00125 const eOpCube<T1, eop_cube_acosh>
00126 acosh(const BaseCube<typename T1::elem_type,T1>& A)
00127   {
00128   arma_extra_debug_sigprint();
00129   
00130   return eOpCube<T1, eop_cube_acosh>(A.get_ref());
00131   }
00132 
00133 
00134 
00135 //
00136 // sin
00137 
00138 template<typename T1>
00139 arma_inline
00140 const eOp<T1, eop_sin>
00141 sin(const Base<typename T1::elem_type,T1>& A)
00142   {
00143   arma_extra_debug_sigprint();
00144   
00145   return eOp<T1, eop_sin>(A.get_ref());
00146   }
00147 
00148 
00149 
00150 template<typename T1>
00151 arma_inline
00152 const eOpCube<T1, eop_cube_sin>
00153 sin(const BaseCube<typename T1::elem_type,T1>& A)
00154   {
00155   arma_extra_debug_sigprint();
00156   
00157   return eOpCube<T1, eop_cube_sin>(A.get_ref());
00158   }
00159 
00160 
00161 
00162 //
00163 // asin
00164 
00165 template<typename T1>
00166 arma_inline
00167 const eOp<T1, eop_asin>
00168 asin(const Base<typename T1::elem_type,T1>& A)
00169   {
00170   arma_extra_debug_sigprint();
00171   
00172   return eOp<T1, eop_asin>(A.get_ref());
00173   }
00174 
00175 
00176 
00177 template<typename T1>
00178 arma_inline
00179 const eOpCube<T1, eop_cube_asin>
00180 asin(const BaseCube<typename T1::elem_type,T1>& A)
00181   {
00182   arma_extra_debug_sigprint();
00183   
00184   return eOpCube<T1, eop_cube_asin>(A.get_ref());
00185   }
00186 
00187 
00188 
00189 //
00190 // sinh
00191 
00192 template<typename T1>
00193 arma_inline
00194 const eOp<T1, eop_sinh>
00195 sinh(const Base<typename T1::elem_type,T1>& A)
00196   {
00197   arma_extra_debug_sigprint();
00198   
00199   return eOp<T1, eop_sinh>(A.get_ref());
00200   }
00201 
00202 
00203 
00204 template<typename T1>
00205 arma_inline
00206 const eOpCube<T1, eop_cube_sinh>
00207 sinh(const BaseCube<typename T1::elem_type,T1>& A)
00208   {
00209   arma_extra_debug_sigprint();
00210   
00211   return eOpCube<T1, eop_cube_sinh>(A.get_ref());
00212   }
00213 
00214 
00215 
00216 //
00217 // asinh
00218 
00219 template<typename T1>
00220 arma_inline
00221 const eOp<T1, eop_asinh>
00222 asinh(const Base<typename T1::elem_type,T1>& A)
00223   {
00224   arma_extra_debug_sigprint();
00225   
00226   return eOp<T1, eop_asinh>(A.get_ref());
00227   }
00228 
00229 
00230 
00231 template<typename T1>
00232 arma_inline
00233 const eOpCube<T1, eop_cube_asinh>
00234 asinh(const BaseCube<typename T1::elem_type,T1>& A)
00235   {
00236   arma_extra_debug_sigprint();
00237   
00238   return eOpCube<T1, eop_cube_asinh>(A.get_ref());
00239   }
00240 
00241 
00242 
00243 //
00244 // tan
00245 
00246 template<typename T1>
00247 arma_inline
00248 const eOp<T1, eop_tan>
00249 tan(const Base<typename T1::elem_type,T1>& A)
00250   {
00251   arma_extra_debug_sigprint();
00252   
00253   return eOp<T1, eop_tan>(A.get_ref());
00254   }
00255 
00256 
00257 
00258 template<typename T1>
00259 arma_inline
00260 const eOpCube<T1, eop_cube_tan>
00261 tan(const BaseCube<typename T1::elem_type,T1>& A)
00262   {
00263   arma_extra_debug_sigprint();
00264   
00265   return eOpCube<T1, eop_cube_tan>(A.get_ref());
00266   }
00267 
00268 
00269 
00270 //
00271 // atan
00272 
00273 template<typename T1>
00274 arma_inline
00275 const eOp<T1, eop_atan>
00276 atan(const Base<typename T1::elem_type,T1>& A)
00277   {
00278   arma_extra_debug_sigprint();
00279   
00280   return eOp<T1, eop_atan>(A.get_ref());
00281   }
00282 
00283 
00284 
00285 template<typename T1>
00286 arma_inline
00287 const eOpCube<T1, eop_cube_atan>
00288 atan(const BaseCube<typename T1::elem_type,T1>& A)
00289   {
00290   arma_extra_debug_sigprint();
00291   
00292   return eOpCube<T1, eop_cube_atan>(A.get_ref());
00293   }
00294 
00295 
00296 
00297 //
00298 // tanh
00299 
00300 template<typename T1>
00301 arma_inline
00302 const eOp<T1, eop_tanh>
00303 tanh(const Base<typename T1::elem_type,T1>& A)
00304   {
00305   arma_extra_debug_sigprint();
00306   
00307   return eOp<T1, eop_tanh>(A.get_ref());
00308   }
00309 
00310 
00311 
00312 template<typename T1>
00313 arma_inline
00314 const eOpCube<T1, eop_cube_tanh>
00315 tanh(const BaseCube<typename T1::elem_type,T1>& A)
00316   {
00317   arma_extra_debug_sigprint();
00318   
00319   return eOpCube<T1, eop_cube_tanh>(A.get_ref());
00320   }
00321 
00322 
00323 
00324 //
00325 // atanh
00326 
00327 template<typename T1>
00328 arma_inline
00329 const eOp<T1, eop_atanh>
00330 atanh(const Base<typename T1::elem_type,T1>& A)
00331   {
00332   arma_extra_debug_sigprint();
00333   
00334   return eOp<T1, eop_atanh>(A.get_ref());
00335   }
00336 
00337 
00338 
00339 template<typename T1>
00340 arma_inline
00341 const eOpCube<T1, eop_cube_atanh>
00342 atanh(const BaseCube<typename T1::elem_type,T1>& A)
00343   {
00344   arma_extra_debug_sigprint();
00345   
00346   return eOpCube<T1, eop_cube_atanh>(A.get_ref());
00347   }
00348 
00349 
00350 
00351 //! @}