politopix  4.1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CellByCellVoronoiDist Class Reference

Constructor. More...

#include <Voronoi_Rn.h>

Inheritance diagram for CellByCellVoronoiDist:
Inheritance graph
Collaboration diagram for CellByCellVoronoiDist:
Collaboration graph

Public Member Functions

 CellByCellVoronoiDist (const boost::shared_ptr< Polytope_Rn > &is, const std::vector< Point_Rn > &lop)
 Constructor. More...
 
 CellByCellVoronoiDist (const boost::shared_ptr< Polytope_Rn > &is, const std::vector< Point_Rn > &lop, double percent)
 
virtual ~CellByCellVoronoiDist ()
 Destructor. More...
 
virtual bool compute () throw (std::length_error)
 Run the whole algorithm. More...
 
void processDistances (std::vector< std::pair< double, unsigned int > > &allDistances, std::vector< Point_Rn >::const_iterator newVoronoiSeed, boost::shared_ptr< Polytope_Rn > newVoronoiCell)
 The distance criterion is going to be used to classify partially or globally the way in which we process the cells' half-spaces. More...
 
void setAverageNumberOfNeighbours (double pc)
 When we want to do a partial sort so try to assess the average number of facet neighbours for each cell. More...
 
- Public Member Functions inherited from CellByCellVoronoi
 CellByCellVoronoi (const boost::shared_ptr< Polytope_Rn > &is, const std::vector< Point_Rn > &lop)
 Constructor. More...
 
virtual ~CellByCellVoronoi ()
 Destructor. More...
 
- Public Member Functions inherited from Voronoi_Rn
 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...
 
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 throw (std::domain_error)
 
void dump (std::ostream &out) const
 Dump the cell structure on the given output. More...
 
void gnuplot (std::ostream &out) const throw (std::domain_error)
 

Protected Attributes

double _percentageOfSortedHalfSpaces
 The amount of half-spaces we want to sort. More...
 
std::vector< boost::shared_ptr
< HalfSpace_Rn > > 
_allHalfSpaces
 For each seed, the list of the half-spaces used to build its cell. More...
 
- Protected Attributes inherited from Voronoi_Rn
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...
 

Additional Inherited Members

- Public Types inherited from Voronoi_Rn
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...
 

Detailed Description

Constructor.

Constructor

Parameters
isThe input space in which the Voronoi diagram is computed
lopThe list of Voronoi seeds Destructor Run the whole algorithm At the end of each iteration, For the current cell, store its neighbour cell numbers. _facetNeighbours[i] = {(j,k1), (j',k2), ...} <=> polytope i and polytope k1 share in common the facet j in polytope i Then we must have _facetNeighbours[k1] = {(j1,i), ...} polytope k1 and polytope i share in common the facet j1 in polytope k1 Computes the Voronoi diagram cell by cell after sorting the .

Definition at line 185 of file Voronoi_Rn.h.

Constructor & Destructor Documentation

CellByCellVoronoiDist::CellByCellVoronoiDist ( const boost::shared_ptr< Polytope_Rn > &  is,
const std::vector< Point_Rn > &  lop 
)
inline

Constructor.

Constructor

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

Definition at line 194 of file Voronoi_Rn.h.

CellByCellVoronoiDist::CellByCellVoronoiDist ( const boost::shared_ptr< Polytope_Rn > &  is,
const std::vector< Point_Rn > &  lop,
double  percent 
)
inline

Constructor

Parameters
isThe input space in which the Voronoi diagram is computed
lopThe list of Voronoi seeds
percentThe percentage of seeds to be sorted according to distance criteria

Definition at line 202 of file Voronoi_Rn.h.

virtual CellByCellVoronoiDist::~CellByCellVoronoiDist ( )
inlinevirtual

Destructor.

Definition at line 207 of file Voronoi_Rn.h.

Member Function Documentation

bool CellByCellVoronoiDist::compute ( )
throw (std::length_error
)
virtual

Run the whole algorithm.

Reimplemented from CellByCellVoronoi.

Reimplemented in CellByCellVoronoiDistNgb.

Definition at line 439 of file Voronoi_Rn.cpp.

Here is the call graph for this function:

void CellByCellVoronoiDist::processDistances ( std::vector< std::pair< double, unsigned int > > &  allDistances,
std::vector< Point_Rn >::const_iterator  newVoronoiSeed,
boost::shared_ptr< Polytope_Rn newVoronoiCell 
)

The distance criterion is going to be used to classify partially or globally the way in which we process the cells' half-spaces.

Definition at line 383 of file Voronoi_Rn.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void CellByCellVoronoiDist::setAverageNumberOfNeighbours ( double  pc)
inline

When we want to do a partial sort so try to assess the average number of facet neighbours for each cell.

Definition at line 219 of file Voronoi_Rn.h.

Here is the caller graph for this function:

Member Data Documentation

std::vector< boost::shared_ptr<HalfSpace_Rn> > CellByCellVoronoiDist::_allHalfSpaces
protected

For each seed, the list of the half-spaces used to build its cell.

Definition at line 225 of file Voronoi_Rn.h.

double CellByCellVoronoiDist::_percentageOfSortedHalfSpaces
protected

The amount of half-spaces we want to sort.

Definition at line 223 of file Voronoi_Rn.h.


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