IAddInfoStatistics.hpp
1 #pragma once
2 
3 #include "DM/config.hpp"
4 #include "DM/IAddInfo.hpp"
5 
6 DM_NAMESPACE_BEGIN
7 
8 /// \brief stores a statistics about a set of addinfo objects.
9 /**
10  The statistic objects provides information about the minimum and maximum value, as well as,
11  the nummber of values that have been aggregated for each addinfo column. the minimum and maximum
12  values can be accesed through two addinfo objects. It is secured that the minimum and maximum objects
13  and the internal count vector are aligned (same AddInfoLayout)
14 */
15 class DM_API IAddInfoStatistics : public ObjectBase
16 {
17 public:
18  static IAddInfoStatistics *New(const IAddInfoLayout &layout, int64_t geometryCount);
19  static IAddInfoStatistics *Empty(); //creates an empty IAddInfoStatistics object
20 
21 protected:
22  virtual ~IAddInfoStatistics() {}
23 
24 public:
25  //IAddInfoStatistics Interface ==================================================
26  virtual bool empty() const = 0;
27 
28  /// number of columns that are stored in the object
29  virtual unsigned columns() const = 0;
30 
31  /// access the layout of the attributs
32  virtual const IAddInfoLayout& layout() const = 0;
33 
34  /// addinfo object containing all minimum values
35  virtual const IAddInfo& (min)() const = 0;
36  /// addinfo object containing all maximum values
37  virtual const IAddInfo& (max)() const = 0;
38 
39  /// get the count of values the were collected for the corresponding column
40  virtual int64_t count(unsigned col) const = 0;
41 
42  /// get the mean of values the were collected for the corresponding column
43  virtual double mean(unsigned col) const = 0;
44  /// get the sigma of values the were collected for the corresponding column
45  virtual double sigma(unsigned col) const = 0;
46 
47  virtual void merge( const IAddInfoStatistics &other ) = 0;
48 };
49 
51 
52 DM_NAMESPACE_END
AddInfo layouts describe a set of attributes that can be attached to geometry objects.
Definition: IAddInfoLayout.hpp:18
AddInfo objects store a set of attributes.
Definition: M/c++_api/inc/DM/IAddInfo.hpp:14
@ count
always last element
stores a statistics about a set of addinfo objects.
Definition: IAddInfoStatistics.hpp:15
Smart pointer class using reference counting with support for DM objects (see ObjectBase)
Definition: Handle.hpp:75
Definition: M/c++_api/inc/DM/ObjectBase.hpp:8