fn_trig.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 //! \addtogroup fn_trig
00017 //! @{
00018 
00019 //
00020 // trigonometric functions:
00021 // cos family: cos, acos, cosh, acosh
00022 // sin family: sin, asin, sinh, asinh
00023 // tan family: tan, atan, tanh, atanh
00024 
00025 
00026 //
00027 // cos
00028 
00029 template<typename T1>
00030 inline
00031 const Op<T1, op_cos>
00032 cos(const Base<typename T1::elem_type,T1>& A)
00033   {
00034   arma_extra_debug_sigprint();
00035   
00036   return Op<T1, op_cos>(A.get_ref());
00037   }
00038 
00039 
00040 
00041 //
00042 // acos
00043 
00044 template<typename T1>
00045 inline
00046 const Op<T1, op_acos>
00047 acos(const Base<typename T1::elem_type,T1>& A)
00048   {
00049   arma_extra_debug_sigprint();
00050   
00051   return Op<T1, op_acos>(A.get_ref());
00052   }
00053 
00054 
00055 
00056 //
00057 // cosh
00058 
00059 template<typename T1>
00060 inline
00061 const Op<T1, op_cosh>
00062 cosh(const Base<typename T1::elem_type,T1>& A)
00063   {
00064   arma_extra_debug_sigprint();
00065   
00066   return Op<T1, op_cosh>(A.get_ref());
00067   }
00068 
00069 
00070 
00071 //
00072 // acosh
00073 
00074 template<typename T1>
00075 inline
00076 const Op<T1, op_acosh>
00077 acosh(const Base<typename T1::elem_type,T1>& A)
00078   {
00079   arma_extra_debug_sigprint();
00080   
00081   return Op<T1, op_acosh>(A.get_ref());
00082   }
00083 
00084 
00085 
00086 //
00087 // sin
00088 
00089 template<typename T1>
00090 inline
00091 const Op<T1, op_sin>
00092 sin(const Base<typename T1::elem_type,T1>& A)
00093   {
00094   arma_extra_debug_sigprint();
00095   
00096   return Op<T1, op_sin>(A.get_ref());
00097   }
00098 
00099 
00100 
00101 //
00102 // asin
00103 
00104 template<typename T1>
00105 inline
00106 const Op<T1, op_asin>
00107 asin(const Base<typename T1::elem_type,T1>& A)
00108   {
00109   arma_extra_debug_sigprint();
00110   
00111   return Op<T1, op_asin>(A.get_ref());
00112   }
00113 
00114 
00115 
00116 //
00117 // sinh
00118 
00119 template<typename T1>
00120 inline
00121 const Op<T1, op_sinh>
00122 sinh(const Base<typename T1::elem_type,T1>& A)
00123   {
00124   arma_extra_debug_sigprint();
00125   
00126   return Op<T1, op_sinh>(A.get_ref());
00127   }
00128 
00129 
00130 
00131 //
00132 // asinh
00133 
00134 template<typename T1>
00135 inline
00136 const Op<T1, op_asinh>
00137 asinh(const Base<typename T1::elem_type,T1>& A)
00138   {
00139   arma_extra_debug_sigprint();
00140   
00141   return Op<T1, op_asinh>(A.get_ref());
00142   }
00143 
00144 
00145 
00146 //
00147 // tan
00148 
00149 template<typename T1>
00150 inline
00151 const Op<T1, op_tan>
00152 tan(const Base<typename T1::elem_type,T1>& A)
00153   {
00154   arma_extra_debug_sigprint();
00155   
00156   return Op<T1, op_tan>(A.get_ref());
00157   }
00158 
00159 
00160 
00161 //
00162 // atan
00163 
00164 template<typename T1>
00165 inline
00166 const Op<T1, op_atan>
00167 atan(const Base<typename T1::elem_type,T1>& A)
00168   {
00169   arma_extra_debug_sigprint();
00170   
00171   return Op<T1, op_atan>(A.get_ref());
00172   }
00173 
00174 
00175 
00176 //
00177 // tanh
00178 
00179 template<typename T1>
00180 inline
00181 const Op<T1, op_tanh>
00182 tanh(const Base<typename T1::elem_type,T1>& A)
00183   {
00184   arma_extra_debug_sigprint();
00185   
00186   return Op<T1, op_tanh>(A.get_ref());
00187   }
00188 
00189 
00190 
00191 //
00192 // atanh
00193 
00194 template<typename T1>
00195 inline
00196 const Op<T1, op_atanh>
00197 atanh(const Base<typename T1::elem_type,T1>& A)
00198   {
00199   arma_extra_debug_sigprint();
00200   
00201   return Op<T1, op_atanh>(A.get_ref());
00202   }
00203 
00204 
00205 
00206 //! @}