IndexDescription.hpp
1 #pragma once
2 
3 #include "opals/config.hpp"
4 #include "opals/String.hpp"
5 #include "opals/IndexType.hpp"
6 
7 namespace opals
8 {
9 
10  /// \brief IndexDescription provides generic information about a spatial index (used by DataSetStats).
11  ///
12  /// If a specific information is really set, can be retrieved by the corresponding isSet function.
13  /// Depending on the data type a specific no data value is used to indicate unset values.
14  ///
15  /// \author JO
16  /// \date 20.06.2012
17  class OPALS_API IndexDescription
18  {
19  public:
21  virtual ~IndexDescription();
22 
23  void reset();
24 
25  bool isSetDimension() const;
26  bool isSetType() const;
27  bool isSetDepth() const;
28  bool isSetCountNode() const;
29  bool isSetCountLeaf() const;
30  bool isSetTileSize() const;
31  bool isSetObjectsInLeafMin() const;
32  bool isSetObjectsInLeafMax() const;
33  bool isSetObjectsInLeafMean() const;
34  bool isSetObjectsInLeafStd() const;
35 
36  bool containsPoints() const;
37  bool containsLines() const;
38  bool containsPolygons() const;
39 
40  int getDimension() const;
41  IndexType getType() const;
42  int getDepth() const;
43  int getCountNode() const;
44  int getCountLeaf() const;
45  double getTileSize() const;
46  long long getObjectsInLeafMin() const;
47  long long getObjectsInLeafMax() const;
48  double getObjectsInLeafMean() const;
49  double getObjectsInLeafStd() const;
50 
51  void setGeometries(bool ContainsPoints, bool ContainsLines, bool ContainsPolygons);
52 
53  void setDimension(const int &Dim);
54  void setType(const IndexType &Type);
55  void setDepth(const int& Depth);
56  void setCountNode(const int& LeafCount);
57  void setCountLeaf(const int& LeafCount);
58  void setTileSize(const double& TileSize);
59  void setObjectsInLeafMin(const long long& min);
60  void setObjectsInLeafMax(const long long& max);
61  void setObjectsInLeafMean(const double& mean);
62  void setObjectsInLeafStd(const double& stddev);
63 
64  // output functions
65  String logIndexDescription() const; ///< for xml output
66  String printIndexDescription() const; ///< for log output (in more readable format)
67 
68  static String printIndexHeader(); ///< for log the header line
69 
70  private:
71  int dimension;
72  IndexType type;
73  int depth;
74  bool hasPoints;
75  bool hasLines;
76  bool hasPolygons;
77  int countLeaf;
78  int countNode;
79  double tileSize;
80  long long objectsInLeafMin;
81  long long objectsInLeafMax;
82  double objectsInLeafMean;
83  double objectsInLeafStd;
84  };
85 }
IndexType
TODO: Enumerator for what?
Definition: IndexType.hpp:8
@ mean
Mean.
Contains the public interface of OPALS.
Definition: AbsValueOrQuantile.hpp:8
IndexDescription provides generic information about a spatial index (used by DataSetStats).
Definition: IndexDescription.hpp:17
A dynamic character string whose interface conforms to STL's std::string.
Definition: String.hpp:35