00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 class op_log
00022 {
00023 public:
00024
00025 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_log>& in);
00026 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_log>& in);
00027 };
00028
00029
00030
00031 class op_trunc_log
00032 {
00033 public:
00034
00035 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_trunc_log>& in);
00036 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_trunc_log>& in);
00037 };
00038
00039
00040
00041 class op_log10
00042 {
00043 public:
00044
00045 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_log10>& in);
00046 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_log10>& in);
00047 };
00048
00049
00050
00051 class op_exp
00052 {
00053 public:
00054
00055 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_exp>& in);
00056 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_exp>& in);
00057 };
00058
00059
00060
00061 class op_trunc_exp
00062 {
00063 public:
00064
00065 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_trunc_exp>& in);
00066 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_trunc_exp>& in);
00067 };
00068
00069
00070
00071 class op_sqrt
00072 {
00073 public:
00074
00075 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_sqrt>& in);
00076 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_sqrt>& in);
00077 };
00078
00079
00080
00081 class op_square
00082 {
00083 public:
00084
00085 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_square>& in);
00086 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_square>& in);
00087 };
00088
00089
00090
00091 class op_pow
00092 {
00093 public:
00094
00095 template<typename T1, typename T2> static inline T1 internal_pow(const T1 base, const T2 exponent);
00096
00097 template<typename T2> static inline char internal_pow(const char base, const T2 exponent);
00098 template<typename T2> static inline unsigned char internal_pow(const unsigned char base, const T2 exponent);
00099
00100 template<typename T2> static inline int internal_pow(const int base, const T2 exponent);
00101 template<typename T2> static inline unsigned int internal_pow(const unsigned int base, const T2 exponent);
00102
00103
00104 template<typename T1> inline static void apply( Mat<typename T1::pod_type>& out, const Op<T1,op_pow>& in);
00105 template<typename T1> inline static void apply(Cube<typename T1::pod_type>& out, const OpCube<T1,op_pow>& in);
00106
00107 template<typename T1> inline static void apply( Mat< std::complex<typename T1::pod_type> >& out, const Op<T1,op_pow>& in);
00108 template<typename T1> inline static void apply(Cube< std::complex<typename T1::pod_type> >& out, const OpCube<T1,op_pow>& in);
00109 };
00110
00111
00112
00113 class op_pow_s32
00114 {
00115 public:
00116
00117 template<typename T1> static inline T1 internal_pow(const T1 base, const int exponent);
00118
00119 static inline char internal_pow(const char base, const int exponent);
00120 static inline unsigned char internal_pow(const unsigned char base, const int exponent);
00121
00122 static inline int internal_pow(const int base, const int exponent);
00123 static inline unsigned int internal_pow(const unsigned int base, const int exponent);
00124
00125
00126 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_pow_s32>& in);
00127 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_pow_s32>& in);
00128 };
00129
00130
00131
00132 class op_conj
00133 {
00134 public:
00135
00136 template<typename T1> inline static void apply( Mat<typename T1::elem_type>& out, const Op<T1,op_conj>& in);
00137 template<typename T1> inline static void apply(Cube<typename T1::elem_type>& out, const OpCube<T1,op_conj>& in);
00138 };
00139
00140
00141