source: trunk/src/Statistics.h @ 117

Last change on this file since 117 was 117, checked in by Peter, 18 years ago

modified to take vector<size_t>

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 833 bytes
Line 
1// $Id: Statistics.h 117 2004-07-19 15:09:14Z peter $
2
3#ifndef _theplu_cpptools_statistics_
4#define _theplu_cpptools_statistics_
5
6// C++ tools include
7/////////////////////
8
9// Standard C++ includes
10////////////////////////
11#include <vector>
12
13namespace theplu {
14namespace cpptools { 
15
16  ///
17  /// Class for basic statistics
18  ///   
19  class Statistics
20  {
21 
22  public:
23    ///
24    /// Constructor
25    ///
26    Statistics();
27
28    ///
29    /// @return median
30    ///
31    double median(std::vector<double>&); 
32
33    ///
34    /// @return median
35    ///
36    double median(std::vector<size_t>&); 
37
38    ///
39    /// @return \a i'th percentile
40    ///
41    double percentile(std::vector<double>&, double i);
42
43    ///
44    /// @return \a i'th percentile
45    ///
46    double percentile(std::vector<size_t>&, double i);
47
48  private:
49   
50         
51  };
52
53}} // of namespace cpptools and namespace theplu
54
55#endif
56
Note: See TracBrowser for help on using the repository browser.