13 #include "Interpolator.hh"
35 TDE(std::vector<std::vector<double>> points,
36 const bool interp=
true,
37 const bool bounded=
true,
38 const double alpha=0.,
39 const double eps=1e-6);
72 double Evaluate(
const std::vector<double>& v)
const;
78 double Evaluate(
const double& v)
const;
84 double Evaluate(
const double* v)
const;
125 bool axes=
false)
const {
_vor.
Draw(name, color, points, axes); }
128 std::vector<TPolyLine*>
Meshing()
const;
Data stucture of a convex hull.
Definition: Hull.hh:25
const std::vector< double > & GetPoint(const size_t i) const
Returns a specific vertex.
Definition: Voronoi.hh:92
~TDE()
Destructor.
Definition: TDE.cc:53
bool _interp
Apply simplexial interpolation if true.
Definition: TDE.hh:135
const std::vector< Hull > & GetCellArray() const
Returns the array of cells corresponding to the array of vertice.
Definition: Voronoi.hh:95
TH2Poly * DensityProfile() const
Returns a histogram where each bin is a cell and its content is its density.
Definition: TDE.hh:114
const std::vector< double > & GetVertex(const size_t i) const
Returns a specific vertex.
Definition: TDE.hh:93
TPolyLine * BoundingBox() const
Returns a rectangle to be drawn in ROOT (only 2D)
Definition: TDE.hh:108
const bool & IsBounded() const
Returns true if box points have been added.
Definition: Voronoi.hh:104
double operator()(const std::vector< double > &v) const
Overloaded function operator, calls Evaluate.
Definition: TDE.hh:51
std::vector< TPolyLine * > Polygons() const
Returns an array of polygons to be drawn in ROOT (only 2D)
Definition: TDE.hh:111
const bool & IsBounded() const
Returns true if box points have been added.
Definition: TDE.hh:105
std::vector< double > _weights
Weights of each of the point, if repetition.
Definition: TDE.hh:134
const Hull & GetCell(const size_t i) const
Returns a specific cell.
Definition: Voronoi.hh:98
double Evaluate(const std::vector< double > &v) const
Performs the density estimation at an n-point v.
Definition: TDE.cc:76
std::vector< TPolyLine * > Polygons() const
Returns an array of polygons to be drawn in ROOT (only 2D)
Definition: Voronoi.cc:425
Computes the Tesselation Density Estimator (TDE) of a set of points.
Definition: TDE.hh:22
Interpolates between discrete samples of a scalar field.
Definition: Interpolator.hh:22
void Initialize()
Initializes the interpolator if requested.
Definition: TDE.cc:55
const std::vector< std::vector< double > > & GetPointArray() const
Returns the array of points on which the triangulation is constructed.
Definition: Voronoi.hh:89
Computes the Voronoi tessellation of a set of points.
Definition: Voronoi.hh:53
const size_t & GetDimension() const
Returns the dimension of the tesselated space.
Definition: Voronoi.hh:101
Voronoi _vor
Voronoi tesselation of the space.
Definition: TDE.hh:132
const Hull & GetCell(const size_t i) const
Returns a specific cell.
Definition: TDE.hh:99
void Draw(std::string name="", bool color=true, bool points=false, bool axes=false) const
Draws the Voronoi tesselation on a canvas.
Definition: Voronoi.cc:485
void Draw(std::string name="", bool color=true, bool points=false, bool axes=false) const
Draws the underlying Voronoi tesselation on a canvas.
Definition: TDE.hh:122
const size_t & GetDimension() const
Returns the dimension of the tesselated space.
Definition: TDE.hh:102
TDE()
Default constructor, initilizes everything to 0.
Definition: TDE.cc:3
std::vector< TPolyLine * > Meshing() const
Returns the meshing, used to build the interpolation, as polygons.
Definition: TDE.cc:101
double operator()(const double &v) const
Overloaded function operator, calls Evaluate.
Definition: TDE.hh:57
const std::vector< std::vector< double > > & GetPointArray() const
Returns the array of points on which the triangulation is constructed.
Definition: TDE.hh:90
double operator()(const double *v) const
Overloaded function operator, calls Evaluate.
Definition: TDE.hh:63
Interpolator _int
Simplexial interpolator.
Definition: TDE.hh:133
TDE & operator=(const TDE &tde)
Equality operator.
Definition: TDE.cc:41
TPolyLine * BoundingBox() const
Returns a rectangle to be drawn in ROOT (only 2D)
Definition: Voronoi.cc:401
TH2Poly * DensityProfile() const
Returns a histogram where each bin is a cell and its content is its density.
Definition: Voronoi.cc:439
const std::vector< Hull > & GetCellArray() const
Returns the array of cells corresponding to the array of points.
Definition: TDE.hh:96