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 Member Functions | Private Attributes
AlphaComplex Class Reference

Computes the α-complex of a set of points. More...

#include <AlphaComplex.hh>

Public Member Functions

 AlphaComplex ()
 Default constructor, initilizes everything to 0. More...
 
 AlphaComplex (const std::vector< std::vector< double >> &points, const double alpha=0.)
 Normal constructor, sets the vector of points. More...
 
 AlphaComplex (const AlphaComplex &del)
 Copy constructor. More...
 
AlphaComplex & operator= (const AlphaComplex &del)
 Equality operator. More...
 
 ~AlphaComplex ()
 Destructor. More...
 
void Initialize ()
 Find the alpha-complex triangulation of the N points. More...
 
const size_t & GetDimension () const
 Returns the dimension of the space in which the tesselation is constructed. More...
 
const std::vector< std::vector
< double > > & 
GetPointArray () const
 Returns the array of points on which the alpha-complex is constructed. More...
 
const std::vector< double > & GetPoint (const size_t i) const
 Returns a specific point. More...
 
const double & GetVolume () const
 Returns the volume of the alpha-complex. More...
 
const std::vector< double > & GetCellVolumeArray () const
 Returns the volume of the alpha-complex. More...
 
void SetAlpha (const double alpha)
 Returns the volume of the alpha-complex. More...
 
std::vector< TPolyLine * > Polygons (const bool fill=false) const
 Returns an array of polygons to be drawn in ROOT (only 2D) More...
 
TGeoVolume * Polyhedra () const
 Returns a parent volume that contains all of the simplices (only 3D) More...
 
void Draw (const bool fill=false, const bool points=false) const
 Draw the alpha-complex with the requested properties. More...
 
void Paint (const std::string name="", const bool fill=false, const bool points=false, const std::vector< std::string > exts=std::vector< std::string >({"pdf"})) const
 Paints the alpha-complex onto a TCanvas and save it. More...
 

Private Member Functions

double Circumradius (orgQhull::QhullFacet &facet) const
 Returns the circumradius of a simplical facet. More...
 
TGeoVolume * Polyhedron (const std::vector< std::vector< double >> &facet, TGeoHMatrix *&H) const
 Returns a TGeoVolume discribing the simplex in 3D. More...
 

Private Attributes

size_t _dim
 Dimension of the space. More...
 
double _alpha
 Curvature alpha. More...
 
std::vector< std::vector
< double > > 
_points
 Vector of N vertices. More...
 
std::vector< std::vector
< std::vector< double > > > 
_facets
 Array of simplices. More...
 
std::vector< double > _circumradii
 Array of facet circumradii. More...
 
std::vector< double > _areas
 Array of facet areas. More...
 
double _vol
 Volume of the complex. More...
 

Detailed Description

Computes the α-complex of a set of points.

An alpha-complex is the most general definition of a concave hull. The parameter alpha defines the curvature of the circumcircle that limits the maximum distance between two points on the hull.

Constructor & Destructor Documentation

AlphaComplex::AlphaComplex ( )

Default constructor, initilizes everything to 0.

AlphaComplex::AlphaComplex ( const std::vector< std::vector< double >> &  points,
const double  alpha = 0. 
)

Normal constructor, sets the vector of points.

Parameters
pointsN points
alphaCurvature alpha
AlphaComplex::AlphaComplex ( const AlphaComplex &  del)

Copy constructor.

AlphaComplex::~AlphaComplex ( )

Destructor.

Member Function Documentation

double AlphaComplex::Circumradius ( orgQhull::QhullFacet &  facet) const
private

Returns the circumradius of a simplical facet.

Parameters
facetFacet to compute the circumradius of
void AlphaComplex::Draw ( const bool  fill = false,
const bool  points = false 
) const

Draw the alpha-complex with the requested properties.

Parameters
fillFills the cells and remove edges if requested
pointsDraws the points if requested
const std::vector<double>& AlphaComplex::GetCellVolumeArray ( ) const
inline

Returns the volume of the alpha-complex.

const size_t& AlphaComplex::GetDimension ( ) const
inline

Returns the dimension of the space in which the tesselation is constructed.

const std::vector<double>& AlphaComplex::GetPoint ( const size_t  i) const
inline

Returns a specific point.

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

Returns the array of points on which the alpha-complex is constructed.

const double& AlphaComplex::GetVolume ( ) const
inline

Returns the volume of the alpha-complex.

void AlphaComplex::Initialize ( )

Find the alpha-complex triangulation of the N points.

Returns
True if successful
AlphaComplex & AlphaComplex::operator= ( const AlphaComplex &  del)

Equality operator.

void AlphaComplex::Paint ( const std::string  name = "",
const bool  fill = false,
const bool  points = false,
const std::vector< std::string >  exts = std::vector<std::string>({"pdf"}) 
) const

Paints the alpha-complex onto a TCanvas and save it.

Parameters
nameName of the canvas
fillFills the cells and remove edges if requested
pointsDraws the points if requested
extsArray of extensions of the files to produce
std::vector< TPolyLine * > AlphaComplex::Polygons ( const bool  fill = false) const

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

Parameters
fillFills the cells and remove edges if requested
Returns
Array of polygons
TGeoVolume * AlphaComplex::Polyhedra ( ) const

Returns a parent volume that contains all of the simplices (only 3D)

Returns
Parent volume that contains all the polyhedra
TGeoVolume * AlphaComplex::Polyhedron ( const std::vector< std::vector< double >> &  facet,
TGeoHMatrix *&  H 
) const
private

Returns a TGeoVolume discribing the simplex in 3D.

Parameters
facetFacet to represent
HTransformation matrix to place the facet
void AlphaComplex::SetAlpha ( const double  alpha)

Returns the volume of the alpha-complex.

Field Documentation

double AlphaComplex::_alpha
private

Curvature alpha.

std::vector<double> AlphaComplex::_areas
private

Array of facet areas.

std::vector<double> AlphaComplex::_circumradii
private

Array of facet circumradii.

size_t AlphaComplex::_dim
private

Dimension of the space.

std::vector<std::vector<std::vector<double> > > AlphaComplex::_facets
private

Array of simplices.

std::vector<std::vector<double> > AlphaComplex::_points
private

Vector of N vertices.

double AlphaComplex::_vol
private

Volume of the complex.


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