politopix  5.0.0
Voronoi_Rn Class Referenceabstract

Compute a n-dimensional Voronoi diagram. It is a partitioning of a space into regions based on distance to points. Both the space and the list of points are provided as input. More...

#include <Voronoi_Rn.h>

Inheritance diagram for Voronoi_Rn:
Inheritance graph
Collaboration diagram for Voronoi_Rn:
Collaboration graph

Public Types

enum  TypeOfAlgorithm {
  Incremental = 0, CellByCell = 1, CellByCellDist = 2, CellByCellDistNgb = 3,
  CellByCellDistNgb_1pc = 4, CellByCellDistNgb_10pc = 5, CellByCellDistNgb_20pc = 6, CellByCellDistNgb_30pc = 7,
  CellByCellDistNgb_40pc = 8, WithProperties = 10
}
 Choose the kind of algorithm to be run. More...
 

Public Member Functions

 Voronoi_Rn (const boost::shared_ptr< Polytope_Rn > &inputSpace, const std::vector< Point_Rn > &listOfPoints)
 Refers to the class WithProperties. More...
 
virtual ~Voronoi_Rn ()
 Destructor. More...
 
virtual bool compute ()=0
 Run the whole algorithm. More...
 
boost::shared_ptr< HalfSpace_RncomputeMidPlane (std::vector< Point_Rn >::const_iterator seed1, std::vector< Point_Rn >::const_iterator seed2)
 Compute the half-space containing seed1, in between seed1 and seed2, according to the growing seed property. More...
 
const std::vector< boost::shared_ptr< Polytope_Rn > > & getVoronoiCells () const
 
std::vector< boost::shared_ptr< Polytope_Rn > > getVoronoiCells ()
 
const std::vector< Point_Rn > & getListOfSeeds () const
 
bool checkTopologyAndGeometry () const
 
void dump (std::ostream &out) const
 Dump the cell structure on the given output. More...
 
void gnuplot (std::ostream &out) const
 

Protected Attributes

const boost::shared_ptr< Polytope_Rn > & _inputSpace
 The original space to be divided. More...
 
const std::vector< Point_Rn > & _listOfSeeds
 The list of input points. More...
 
std::vector< boost::shared_ptr< Polytope_Rn > > _listOfVoronoiCells
 The list of polytopes partitioning the whole space. More...
 

Detailed Description

Compute a n-dimensional Voronoi diagram. It is a partitioning of a space into regions based on distance to points. Both the space and the list of points are provided as input.

Definition at line 39 of file Voronoi_Rn.h.

Member Enumeration Documentation

◆ TypeOfAlgorithm

Choose the kind of algorithm to be run.

Enumerator
Incremental 
CellByCell 

Refers to the class IncrementalVoronoi.

CellByCellDist 

Refers to the class CellByCellVoronoi.

CellByCellDistNgb 

Refers to the class CellByCellVoronoiDist.

CellByCellDistNgb_1pc 

Refers to the class CellByCellDistNgb (100% of the distances between seeds to be sorted)

CellByCellDistNgb_10pc 

Refers to the class CellByCellDistNgb ( 1% of the distances between seeds to be sorted)

CellByCellDistNgb_20pc 

Refers to the class CellByCellDistNgb ( 10% of the distances between seeds to be sorted)

CellByCellDistNgb_30pc 

Refers to the class CellByCellDistNgb ( 20% of the distances between seeds to be sorted)

CellByCellDistNgb_40pc 

Refers to the class CellByCellDistNgb ( 30% of the distances between seeds to be sorted)

WithProperties 

Refers to the class CellByCellDistNgb ( 40% of the distances between seeds to be sorted)

Definition at line 44 of file Voronoi_Rn.h.

Constructor & Destructor Documentation

◆ Voronoi_Rn()

Voronoi_Rn::Voronoi_Rn ( const boost::shared_ptr< Polytope_Rn > &  inputSpace,
const std::vector< Point_Rn > &  listOfPoints 
)

Refers to the class WithProperties.

Constructor Constructor

Parameters
isThe input space in which the Voronoi diagram is computed
lopThe list of Voronoi seeds

Definition at line 35 of file Voronoi_Rn.cpp.

◆ ~Voronoi_Rn()

virtual Voronoi_Rn::~Voronoi_Rn ( )
inlinevirtual

Destructor.

Definition at line 65 of file Voronoi_Rn.h.

Member Function Documentation

◆ checkTopologyAndGeometry()

bool Voronoi_Rn::checkTopologyAndGeometry ( ) const

Definition at line 57 of file Voronoi_Rn.cpp.

◆ compute()

virtual bool Voronoi_Rn::compute ( )
pure virtual

◆ computeMidPlane()

boost::shared_ptr< HalfSpace_Rn > Voronoi_Rn::computeMidPlane ( std::vector< Point_Rn >::const_iterator  seed1,
std::vector< Point_Rn >::const_iterator  seed2 
)

Compute the half-space containing seed1, in between seed1 and seed2, according to the growing seed property.

Definition at line 40 of file Voronoi_Rn.cpp.

Here is the caller graph for this function:

◆ dump()

void Voronoi_Rn::dump ( std::ostream &  out) const

Dump the cell structure on the given output.

Definition at line 62 of file Voronoi_Rn.cpp.

◆ getListOfSeeds()

const std::vector< Point_Rn >& Voronoi_Rn::getListOfSeeds ( ) const
inline

Definition at line 81 of file Voronoi_Rn.h.

◆ getVoronoiCells() [1/2]

std::vector< boost::shared_ptr<Polytope_Rn> > Voronoi_Rn::getVoronoiCells ( )
inline

Definition at line 79 of file Voronoi_Rn.h.

◆ getVoronoiCells() [2/2]

const std::vector< boost::shared_ptr<Polytope_Rn> >& Voronoi_Rn::getVoronoiCells ( ) const
inline

Definition at line 78 of file Voronoi_Rn.h.

◆ gnuplot()

void Voronoi_Rn::gnuplot ( std::ostream &  out) const

Definition at line 82 of file Voronoi_Rn.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _inputSpace

const boost::shared_ptr<Polytope_Rn>& Voronoi_Rn::_inputSpace
protected

The original space to be divided.

Definition at line 93 of file Voronoi_Rn.h.

◆ _listOfSeeds

const std::vector< Point_Rn >& Voronoi_Rn::_listOfSeeds
protected

The list of input points.

Definition at line 95 of file Voronoi_Rn.h.

◆ _listOfVoronoiCells

std::vector< boost::shared_ptr<Polytope_Rn> > Voronoi_Rn::_listOfVoronoiCells
protected

The list of polytopes partitioning the whole space.

Definition at line 97 of file Voronoi_Rn.h.


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