op_median_proto.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 template<typename T>
00021 struct arma_cx_median_packet
00022 {
00023 T val;
00024 u32 index;
00025 };
00026
00027
00028
00029 template<typename T>
00030 inline
00031 bool
00032 operator< (const arma_cx_median_packet<T>& A, const arma_cx_median_packet<T>& B)
00033 {
00034 return A.val < B.val;
00035 }
00036
00037
00038
00039
00040 class op_median
00041 {
00042 public:
00043
00044 template<typename eT>
00045 inline static eT direct_median(std::vector<eT>& X);
00046
00047 template<typename eT>
00048 inline static eT direct_median(const eT* X, const u32 n_elem);
00049
00050 template<typename eT>
00051 inline static eT direct_median(const subview<eT>& X);
00052
00053 template<typename eT>
00054 inline static eT direct_median(const diagview<eT>& X);
00055
00056 template<typename T1>
00057 inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_median>& in);
00058
00059
00060
00061
00062
00063 template<typename T>
00064 inline static void direct_cx_median_index(u32& out_index1, u32& out_index2, std::vector< arma_cx_median_packet<T> >& X);
00065
00066 template<typename T>
00067 inline static void direct_cx_median_index(u32& out_index1, u32& out_index2, const std::complex<T>* X, const u32 n_elem);
00068
00069 template<typename T>
00070 inline static void direct_cx_median_index(u32& out_index1, u32& out_index2, const subview< std::complex<T> >& X);
00071
00072 template<typename T>
00073 inline static void direct_cx_median_index(u32& out_index1, u32& out_index2, const diagview< std::complex<T> >& X);
00074
00075 template<typename T, typename T1>
00076 inline static void apply(Mat< std::complex<T> >& out, const Op<T1,op_median>& in);
00077
00078
00079 };
00080
00081