SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes
TDE Class Reference

Computes the Tesselation Density Estimator (TDE) of a set of points. More...

#include <TDE.hh>

Public Member Functions

 TDE ()
 Default constructor, initilizes everything to 0. More...
 
 TDE (std::vector< std::vector< double >> points, const bool interp=true, const bool bounded=true, const double alpha=0., const double eps=1e-6)
 Cloud constructor, sets the vector of points. More...
 
 TDE (const TDE &tde)
 Copy constructor. More...
 
TDE & operator= (const TDE &tde)
 Equality operator. More...
 
double operator() (const std::vector< double > &v) const
 Overloaded function operator, calls Evaluate. More...
 
double operator() (const double &v) const
 Overloaded function operator, calls Evaluate. More...
 
double operator() (const double *v) const
 Overloaded function operator, calls Evaluate. More...
 
 ~TDE ()
 Destructor. More...
 
double Evaluate (const std::vector< double > &v) const
 Performs the density estimation at an n-point v. More...
 
double Evaluate (const double &v) const
 Performs the density estimation at an n-point v. More...
 
double Evaluate (const double *v) const
 Performs the density estimation at an n-point v. More...
 
void Initialize ()
 Initializes the interpolator if requested. More...
 
const std::vector< std::vector
< double > > & 
GetPointArray () const
 Returns the array of points on which the triangulation is constructed. More...
 
const std::vector< double > & GetVertex (const size_t i) const
 Returns a specific vertex. More...
 
const std::vector< Hull > & GetCellArray () const
 Returns the array of cells corresponding to the array of points. More...
 
const Hull & GetCell (const size_t i) const
 Returns a specific cell. More...
 
const size_t & GetDimension () const
 Returns the dimension of the tesselated space. More...
 
const bool & IsBounded () const
 Returns true if box points have been added. More...
 
TPolyLine * BoundingBox () const
 Returns a rectangle to be drawn in ROOT (only 2D) More...
 
std::vector< TPolyLine * > Polygons () const
 Returns an array of polygons to be drawn in ROOT (only 2D) More...
 
TH2Poly * DensityProfile () const
 Returns a histogram where each bin is a cell and its content is its density. More...
 
void Draw (std::string name="", bool color=true, bool points=false, bool axes=false) const
 Draws the underlying Voronoi tesselation on a canvas. More...
 
std::vector< TPolyLine * > Meshing () const
 Returns the meshing, used to build the interpolation, as polygons. More...
 

Private Attributes

Voronoi _vor
 Voronoi tesselation of the space. More...
 
Interpolator _int
 Simplexial interpolator. More...
 
std::vector< double > _weights
 Weights of each of the point, if repetition. More...
 
bool _interp
 Apply simplexial interpolation if true. More...
 

Detailed Description

Computes the Tesselation Density Estimator (TDE) of a set of points.

The TDE uses the inverse of the volume of each surrounding Voronoi cell as an estimator for density. The estimator supports simplex interpolation, CVT and PCVT (as defined in the Voronoi class).

Constructor & Destructor Documentation

TDE::TDE ( )

Default constructor, initilizes everything to 0.

TDE::TDE ( std::vector< std::vector< double >>  points,
const bool  interp = true,
const bool  bounded = true,
const double  alpha = 0.,
const double  eps = 1e-6 
)

Cloud constructor, sets the vector of points.

Parameters
pointsN points in a _dim dimensional space
interpInterpolates between the vertices if requested
boundedAdd 2^_dim box vertices to contain the tessellation if requested
alphaPenalised Centroidal TDE Tessellation parameter
epsPrecision required for the pure CVT (alpha = 1.)
TDE::TDE ( const TDE &  tde)

Copy constructor.

TDE::~TDE ( )

Destructor.

Member Function Documentation

TPolyLine* TDE::BoundingBox ( ) const
inline

Returns a rectangle to be drawn in ROOT (only 2D)

TH2Poly* TDE::DensityProfile ( ) const
inline

Returns a histogram where each bin is a cell and its content is its density.

void TDE::Draw ( std::string  name = "",
bool  color = true,
bool  points = false,
bool  axes = false 
) const
inline

Draws the underlying Voronoi tesselation on a canvas.

Parameters
nameWill print the canvas as "VT_name.pdf"
colorImplements a color scale inverse proportional to the cell volume
pointsDraws the points on which the tesselation is constructed
axesDraws axes
double TDE::Evaluate ( const std::vector< double > &  v) const

Performs the density estimation at an n-point v.

Parameters
vVector of coordinates of the n-point
double TDE::Evaluate ( const double &  v) const

Performs the density estimation at an n-point v.

Parameters
vOne dimensional value of the point
double TDE::Evaluate ( const double *  v) const

Performs the density estimation at an n-point v.

Parameters
vPointer to an array of coordinates of the n-point
const Hull& TDE::GetCell ( const size_t  i) const
inline

Returns a specific cell.

const std::vector<Hull>& TDE::GetCellArray ( ) const
inline

Returns the array of cells corresponding to the array of points.

const size_t& TDE::GetDimension ( ) const
inline

Returns the dimension of the tesselated space.

const std::vector<std::vector<double> >& TDE::GetPointArray ( ) const
inline

Returns the array of points on which the triangulation is constructed.

const std::vector<double>& TDE::GetVertex ( const size_t  i) const
inline

Returns a specific vertex.

void TDE::Initialize ( )

Initializes the interpolator if requested.

const bool& TDE::IsBounded ( ) const
inline

Returns true if box points have been added.

std::vector< TPolyLine * > TDE::Meshing ( ) const

Returns the meshing, used to build the interpolation, as polygons.

double TDE::operator() ( const std::vector< double > &  v) const
inline

Overloaded function operator, calls Evaluate.

Parameters
vVector of coordinates
double TDE::operator() ( const double &  v) const
inline

Overloaded function operator, calls Evaluate.

Parameters
vOne dimensional value
double TDE::operator() ( const double *  v) const
inline

Overloaded function operator, calls Evaluate.

Parameters
vPointer to an array of coordinates
TDE & TDE::operator= ( const TDE &  tde)

Equality operator.

std::vector<TPolyLine*> TDE::Polygons ( ) const
inline

Returns an array of polygons to be drawn in ROOT (only 2D)

Field Documentation

Interpolator TDE::_int
private

Simplexial interpolator.

bool TDE::_interp
private

Apply simplexial interpolation if true.

Voronoi TDE::_vor
private

Voronoi tesselation of the space.

std::vector<double> TDE::_weights
private

Weights of each of the point, if repetition.


The documentation for this class was generated from the following files: