Coverage Control Library
Loading...
Searching...
No Matches
Voronoi Class Reference

Class for computing Voronoi cells. More...

#include <voronoi.h>

Public Member Functions

 Voronoi (PointVector const &sites, MapType const &map, Point2 map_size, double const &resolution, bool const compute_single=false, int const robot_id=0)
 
void UpdateSites (PointVector const &sites)
 
void ComputeVoronoiCells ()
 
auto GetVoronoiCells () const
 
auto GetVoronoiCell ()
 
double GetSumIDFSiteDistSqr ()
 
double GetSumIDFGoalDistSqr ()
 

Detailed Description

Class for computing Voronoi cells.

This class contains the sites of the Voronoi cells and the map. It computes the Voronoi cells and stores the mass and centroid of each cell.

Definition at line 119 of file voronoi.h.

Constructor & Destructor Documentation

◆ Voronoi() [1/2]

Voronoi ( )
inline

Definition at line 145 of file voronoi.h.

◆ Voronoi() [2/2]

Voronoi ( PointVector const & sites,
MapType const & map,
Point2 map_size,
double const & resolution,
bool const compute_single = false,
int const robot_id = 0 )
inline

Definition at line 146 of file voronoi.h.

Member Function Documentation

◆ ComputeVoronoiCells()

void ComputeVoronoiCells ( )

Definition at line 167 of file voronoi.cpp.

◆ GetSumIDFGoalDistSqr()

double GetSumIDFGoalDistSqr ( )
inline

Definition at line 198 of file voronoi.h.

◆ GetSumIDFSiteDistSqr()

double GetSumIDFSiteDistSqr ( )
inline

Definition at line 191 of file voronoi.h.

◆ GetVoronoiCell()

auto GetVoronoiCell ( )
inline

Definition at line 189 of file voronoi.h.

◆ GetVoronoiCells()

auto GetVoronoiCells ( ) const
inline

Definition at line 188 of file voronoi.h.

◆ UpdateSites()

void UpdateSites ( PointVector const & sites)
inline

Definition at line 181 of file voronoi.h.