⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mathfunc.h

📁 A C++ class library for scientific computing
💻 H
📖 第 1 页 / 共 5 页
字号:
// Generated: genmathfunc.cpp Jan 28 2005 12:04:32#ifndef BZ_MATHFUNC_H#define BZ_MATHFUNC_H#ifndef BZ_APPLICS_H #error <blitz/mathfunc.h> should be included via <blitz/applics.h>#endif#ifndef BZ_PRETTYPRINT_H #include <blitz/prettyprint.h>#endifBZ_NAMESPACE(blitz)// abs(P_numtype1)    Absolute valuetemplate<typename P_numtype1>class _bz_abs : public OneOperandApplicativeTemplatesBase {public:    typedef P_numtype1 T_numtype1;    typedef P_numtype1 T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(abs)(x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "abs(";        a.prettyPrint(str,format);        str += ")";    }};// abs(long)template<>class _bz_abs<long> : public OneOperandApplicativeTemplatesBase {public:    typedef long T_numtype1;    typedef long T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(labs)((long)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "labs(";        a.prettyPrint(str,format);        str += ")";    }};// abs(float)template<>class _bz_abs<float> : public OneOperandApplicativeTemplatesBase {public:    typedef float T_numtype1;    typedef float T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(fabs)((float)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "fabs(";        a.prettyPrint(str,format);        str += ")";    }};// abs(double)template<>class _bz_abs<double> : public OneOperandApplicativeTemplatesBase {public:    typedef double T_numtype1;    typedef double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(fabs)((double)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "fabs(";        a.prettyPrint(str,format);        str += ")";    }};// abs(long double)template<>class _bz_abs<long double> : public OneOperandApplicativeTemplatesBase {public:    typedef long double T_numtype1;    typedef long double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(fabs)((long double)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "fabs(";        a.prettyPrint(str,format);        str += ")";    }};// abs(complex<float> )#ifdef BZ_HAVE_COMPLEX_FCNStemplate<>class _bz_abs<complex<float> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<float>  T_numtype1;    typedef float T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(abs)((complex<float> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "abs(";        a.prettyPrint(str,format);        str += ")";    }};#endif// abs(complex<double> )#ifdef BZ_HAVE_COMPLEX_FCNStemplate<>class _bz_abs<complex<double> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<double>  T_numtype1;    typedef double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(abs)((complex<double> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "abs(";        a.prettyPrint(str,format);        str += ")";    }};#endif// abs(complex<long double> )#ifdef BZ_HAVE_COMPLEX_FCNStemplate<>class _bz_abs<complex<long double> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<long double>  T_numtype1;    typedef long double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(abs)((complex<long double> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "abs(";        a.prettyPrint(str,format);        str += ")";    }};#endif// acos(P_numtype1)    Inverse cosinetemplate<typename P_numtype1>class _bz_acos : public OneOperandApplicativeTemplatesBase {public:    typedef P_numtype1 T_numtype1;    typedef double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(acos)((double)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "acos(";        a.prettyPrint(str,format);        str += ")";    }};// acos(float)template<>class _bz_acos<float> : public OneOperandApplicativeTemplatesBase {public:    typedef float T_numtype1;    typedef float T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(acos)((float)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "acos(";        a.prettyPrint(str,format);        str += ")";    }};// acos(long double)template<>class _bz_acos<long double> : public OneOperandApplicativeTemplatesBase {public:    typedef long double T_numtype1;    typedef long double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(acos)((long double)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "acos(";        a.prettyPrint(str,format);        str += ")";    }};// acos(complex<float> )#ifdef BZ_HAVE_COMPLEX_MATH2template<>class _bz_acos<complex<float> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<float>  T_numtype1;    typedef complex<float> T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(acos)((complex<float> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "acos(";        a.prettyPrint(str,format);        str += ")";    }};#endif// acos(complex<double> )#ifdef BZ_HAVE_COMPLEX_MATH2template<>class _bz_acos<complex<double> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<double>  T_numtype1;    typedef complex<double> T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(acos)((complex<double> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "acos(";        a.prettyPrint(str,format);        str += ")";    }};#endif// acos(complex<long double> )#ifdef BZ_HAVE_COMPLEX_MATH2template<>class _bz_acos<complex<long double> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<long double>  T_numtype1;    typedef complex<long double> T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(acos)((complex<long double> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "acos(";        a.prettyPrint(str,format);        str += ")";    }};#endif// acosh(P_numtype1)    Inverse hyperbolic cosine#ifdef BZ_HAVE_IEEE_MATHtemplate<typename P_numtype1>class _bz_acosh : public OneOperandApplicativeTemplatesBase {public:    typedef P_numtype1 T_numtype1;    typedef double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_IEEEMATHFN_SCOPE(acosh)((double)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "acosh(";        a.prettyPrint(str,format);        str += ")";    }};#endif// asin(P_numtype1)    Inverse sinetemplate<typename P_numtype1>class _bz_asin : public OneOperandApplicativeTemplatesBase {public:    typedef P_numtype1 T_numtype1;    typedef double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(asin)((double)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "asin(";        a.prettyPrint(str,format);        str += ")";    }};// asin(float)template<>class _bz_asin<float> : public OneOperandApplicativeTemplatesBase {public:    typedef float T_numtype1;    typedef float T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(asin)((float)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "asin(";        a.prettyPrint(str,format);        str += ")";    }};// asin(long double)template<>class _bz_asin<long double> : public OneOperandApplicativeTemplatesBase {public:    typedef long double T_numtype1;    typedef long double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_MATHFN_SCOPE(asin)((long double)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "asin(";        a.prettyPrint(str,format);        str += ")";    }};// asin(complex<float> )#ifdef BZ_HAVE_COMPLEX_MATH2template<>class _bz_asin<complex<float> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<float>  T_numtype1;    typedef complex<float> T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(asin)((complex<float> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "asin(";        a.prettyPrint(str,format);        str += ")";    }};#endif// asin(complex<double> )#ifdef BZ_HAVE_COMPLEX_MATH2template<>class _bz_asin<complex<double> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<double>  T_numtype1;    typedef complex<double> T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(asin)((complex<double> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "asin(";        a.prettyPrint(str,format);        str += ")";    }};#endif// asin(complex<long double> )#ifdef BZ_HAVE_COMPLEX_MATH2template<>class _bz_asin<complex<long double> > : public OneOperandApplicativeTemplatesBase {public:    typedef complex<long double>  T_numtype1;    typedef complex<long double> T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_CMATHFN_SCOPE(asin)((complex<long double> )x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "asin(";        a.prettyPrint(str,format);        str += ")";    }};#endif// asinh(P_numtype1)    Inverse hyperbolic sine#ifdef BZ_HAVE_IEEE_MATHtemplate<typename P_numtype1>class _bz_asinh : public OneOperandApplicativeTemplatesBase {public:    typedef P_numtype1 T_numtype1;    typedef double T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return BZ_IEEEMATHFN_SCOPE(asinh)((double)x); }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "asinh(";        a.prettyPrint(str,format);        str += ")";    }};#endif// arg(P_numtype1)#ifdef BZ_HAVE_COMPLEX_FCNStemplate<typename P_numtype1>class _bz_arg : public OneOperandApplicativeTemplatesBase {public:    typedef P_numtype1 T_numtype1;    typedef P_numtype1 T_numtype;    static inline T_numtype apply(T_numtype1 x)    { return 0; }    template<typename T1>    static void prettyPrint(BZ_STD_SCOPE(string) &str, prettyPrintFormat& format,        const T1& a)    {        str += "0(";        a.prettyPrint(str,format);        str += ")";    }};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -