00001 #ifndef _theplu_yat_statistics_vector_function_
00002 #define _theplu_yat_statistics_vector_function_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <vector>
00026
00027 namespace theplu {
00028 namespace yat {
00029 namespace statistics {
00030
00034 struct VectorFunction
00035 {
00039 virtual ~VectorFunction();
00040
00044 virtual double operator()(const std::vector<double>&) const=0;
00045 };
00046
00047
00051 struct Max : public VectorFunction
00052 {
00056 double operator()(const std::vector<double>&) const;
00057 };
00058
00059
00063 struct Median : public VectorFunction
00064 {
00070 double operator()(const std::vector<double>&) const;
00071 };
00072
00076 struct Mean : public VectorFunction
00077 {
00081 double operator()(const std::vector<double>&) const;
00082 };
00083
00084
00088 struct Min : public VectorFunction
00089 {
00093 double operator()(const std::vector<double>&) const;
00094 };
00095
00099 class Nth_Element : public VectorFunction
00100 {
00101 public:
00106 Nth_Element(size_t N);
00107
00111 double operator()(const std::vector<double>&) const;
00112
00113 private:
00114 size_t N_;
00115 };
00116
00117 }}}
00118
00119 #endif