IT++ Logo
trig_hyp.h
Go to the documentation of this file.
00001 
00029 #ifndef TRIG_HYP_H
00030 #define TRIG_HYP_H
00031 
00032 #include <itpp/base/help_functions.h>
00033 
00034 
00035 namespace itpp
00036 {
00037 
00040 
00042 inline double sinc(double x)
00043 {
00044   if (x == 0) {
00045     return 1.0;
00046   }
00047   else {
00048     double pix = itpp::pi * x;
00049     return sin(pix) / pix;
00050   }
00051 }
00052 
00054 inline vec sin(const vec &x) { return apply_function<double>(std::sin, x); }
00056 inline mat sin(const mat &x) { return apply_function<double>(std::sin, x); }
00058 inline vec cos(const vec &x) { return apply_function<double>(std::cos, x); }
00060 inline mat cos(const mat &x) { return apply_function<double>(std::cos, x); }
00062 inline vec tan(const vec &x) { return apply_function<double>(std::tan, x); }
00064 inline mat tan(const mat &x) { return apply_function<double>(std::tan, x); }
00066 inline vec asin(const vec &x) { return apply_function<double>(std::asin, x); }
00068 inline mat asin(const mat &x) { return apply_function<double>(std::asin, x); }
00070 inline vec acos(const vec &x) { return apply_function<double>(std::acos, x); }
00072 inline mat acos(const mat &x) { return apply_function<double>(std::acos, x); }
00074 inline vec atan(const vec &x) { return apply_function<double>(std::atan, x); }
00076 inline mat atan(const mat &x) { return apply_function<double>(std::atan, x); }
00078 inline vec sinc(const vec &x) { return apply_function<double>(sinc, x); }
00080 inline mat sinc(const mat &x) { return apply_function<double>(sinc, x); }
00081 
00083 
00084 
00087 
00089 inline vec sinh(const vec &x) { return apply_function<double>(std::sinh, x); }
00091 inline mat sinh(const mat &x) { return apply_function<double>(std::sinh, x); }
00093 inline vec cosh(const vec &x) { return apply_function<double>(std::cosh, x); }
00095 inline mat cosh(const mat &x) { return apply_function<double>(std::cosh, x); }
00097 inline vec tanh(const vec &x) { return apply_function<double>(std::tanh, x); }
00099 inline mat tanh(const mat &x) { return apply_function<double>(std::tanh, x); }
00101 vec asinh(const vec &x);
00103 mat asinh(const mat &x);
00105 vec acosh(const vec &x);
00107 mat acosh(const mat &x);
00109 vec atanh(const vec &x);
00111 mat atanh(const mat &x);
00112 
00114 
00115 } // namespace itpp
00116 
00117 #endif // #ifndef TRIG_HYP_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SourceForge Logo

Generated on Wed Jul 27 2011 16:27:04 for IT++ by Doxygen 1.7.4