IAddInfoStatistics.hpp
1 #ifndef DM_IADDINFO_STATISTICS_HPP_INCLUDED
2 #define DM_IADDINFO_STATISTICS_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 #include "DM/IAddInfo.hpp"
10 
11 DM_NAMESPACE_BEGIN
12 
13 /// \brief stores a statistics about a set of addinfo objects.
14 /**
15  The statistic objects provides information about the minimum and maximum value, as well as,
16  the nummber of values that have been aggregated for each addinfo column. the minimum and maximum
17  values can be accesed through two addinfo objects. It is secured that the minimum and maximum objects
18  and the internal count vector are aligned (same AddInfoLayout)
19 */
20 class DM_API IAddInfoStatistics : public ObjectBase
21 {
22 protected:
23  virtual ~IAddInfoStatistics() {}
24 
25 public:
26  //IAddInfoStatistics Interface ==================================================
27  virtual bool empty() const = 0;
28 
29  /// number of columns that are stored in the object
30  virtual unsigned columns() const = 0;
31 
32  /// access the layout of the attributs
33  virtual const IAddInfoLayout& layout() const = 0;
34 
35  /// addinfo object containing all minimum values
36  virtual const IAddInfo& (min)() const = 0;
37  /// addinfo object containing all maximum values
38  virtual const IAddInfo& (max)() const = 0;
39 
40  /// get the count of values the were collected for the corresponding column
41  virtual int64_t count(unsigned col) const = 0;
42 
43  /// get the mean of values the were collected for the corresponding column
44  virtual double mean(unsigned col) const = 0;
45  /// get the sigma of values the were collected for the corresponding column
46  virtual double sigma(unsigned col) const = 0;
47 
48  virtual void merge( const IAddInfoStatistics &other ) = 0;
49 };
50 
52 
53 DM_NAMESPACE_END
54 
55 #endif //DM_IADDINFO_STATISTICS_HPP_INCLUDED