SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
DTFE.hh
1 #ifndef DTFE_HH
2 #define DTFE_HH
3 
4 // C++ includes
5 #include <iostream>
6 #include <ctime>
7 #include <cmath>
8 #include <vector>
9 #include <map>
10 
11 // ROOT includes
12 #include "TPolyLine.h"
13 
14 // QHULL includes
15 #include "PointCoordinates.h"
16 #include "RboxPoints.h"
17 #include "QhullError.h"
18 #include "Qhull.h"
19 #include "QhullQh.h"
20 #include "QhullFacet.h"
21 #include "QhullFacetList.h"
22 #include "QhullFacetSet.h"
23 #include "QhullLinkedList.h"
24 #include "QhullVertex.h"
25 #include "QhullSet.h"
26 #include "QhullVertexSet.h"
27 
28 // Additional includes
29 #include "Matrix.hh"
30 #include "Vertex.hh"
31 #include "Geometry.hh"
32 
42 class DTFE {
43  public:
45  DTFE();
46 
51  DTFE(const std::vector<Vertex>& vertices);
52 
57  DTFE(const std::vector<std::vector<double>>& vertices);
58 
60  DTFE(const DTFE& del);
61 
63  DTFE& operator=(const DTFE& del);
64 
66  ~DTFE();
67 
69  bool Initialize();
70 
72  const size_t& GetDimension() const { return _dim; }
73 
75  const std::vector<Vertex>& GetVertexArray() const { return _vertices; }
76 
78  const Vertex& GetVertex(const size_t i) const { return _vertices[i]; }
79 
81  const std::vector<Vertex>& GetBestFacet(const std::vector<double>& v, bool* isin=NULL) const;
82 
84  std::vector<TPolyLine*> Polygons() const;
85 
86  private:
87 
88  size_t _dim;
89  std::vector<Vertex> _vertices;
90  std::map<size_t, std::vector<Vertex>> _facets;
91  orgQhull::Qhull* _qhull;
92 };
93 
94 #endif
~DTFE()
Destructor.
Definition: DTFE.cc:54
size_t _dim
Dimension of the space.
Definition: DTFE.hh:88
std::vector< TPolyLine * > Polygons() const
Returns an array of polygons to be drawn in ROOT (only 2D)
Definition: DTFE.cc:134
Set of functions that compose the Geometry package.
orgQhull::Qhull * _qhull
Pointer to qhull object, owns the memory.
Definition: DTFE.hh:91
Computes the Delaunay Tesselation Field Estimator (DTFE) of a set of points.
Definition: DTFE.hh:42
std::vector< Vertex > _vertices
Vector of N vertices.
Definition: DTFE.hh:89
std::map< size_t, std::vector< Vertex > > _facets
Map of facets (simplices)
Definition: DTFE.hh:90
const Vertex & GetVertex(const size_t i) const
Returns a specific vertex.
Definition: DTFE.hh:78
DTFE & operator=(const DTFE &del)
Equality operator.
Definition: DTFE.cc:39
const std::vector< Vertex > & GetVertexArray() const
Returns the array of vertices on which the triangulation is constructed.
Definition: DTFE.hh:75
DTFE()
Default constructor, initilizes everything to 0.
Definition: DTFE.cc:3
bool Initialize()
Find the DTFE triangulation of the N vertices.
Definition: DTFE.cc:59
const size_t & GetDimension() const
Returns the dimension of the space in which the tesselation is constructed.
Definition: DTFE.hh:72
const std::vector< Vertex > & GetBestFacet(const std::vector< double > &v, bool *isin=NULL) const
Finds the closest facet and returns its vertices.
Definition: DTFE.cc:110
Defines an n-dimensional vertex and its mapping onto a sclar field.
Definition: Vertex.hh:13