IIndexStats.hpp
1 #ifndef DM_IINDEX_STATS_HPP_INCLUDED
2 #define DM_IINDEX_STATS_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 #include "DM/Handle.hpp"
10 #include "DM/ObjectBase.hpp"
11 
12 DM_NAMESPACE_BEGIN
13 
14 namespace IndexType {
15 
16  enum Type {
17  tiling, ///< flat tiling structure
18  quadtree, ///< quad- or octree structure (depending on index dimension)
19  kdtree, ///< kd-tree structure
20  rtree, ///< r-tree structure
21  count
22  };
23 
24 }
25 
26 /// \brief Object representing statistical information an spatial index
27 class DM_API IIndexStats : public ObjectBase
28 {
29 public:
30  virtual ~IIndexStats() {}
31 
32  /// get an object copy
33  virtual IIndexStats* clone() const = 0;
34 
35  virtual int dimension() const = 0; ///< get index dimension
36  virtual IndexType::Type type() const = 0; ///< get index type
37  virtual int depth() const = 0; ///< get index depth
38  virtual int sizeNode() const = 0; ///< get number of nodes
39  virtual int sizeLeaf() const = 0; ///< get number of leafs (nodes that contain geometry objects)
40  virtual double tileSize() const = 0; ///< get tile size (only relevant if type == IndexType::tiling)
41  virtual long long objectsInLeafMin() const = 0;
42  virtual long long objectsInLeafMax() const = 0;
43  virtual double objectsInLeafMean() const = 0;
44  virtual double objectsInLeafStddev() const = 0;
45 };
46 
48 
49 
50 
51 DM_NAMESPACE_END
52 
53 #endif //DM_IINDEX_STATS_HPP_INCLUDED