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

Struct for Voronoi cell. More...

#include <voronoi.h>

Public Member Functions

Point2 centroid () const
 
double mass () const
 
double sum_idf_site_dist () const
 
double sum_idf_site_dist_sqr () const
 
double sum_idf_goal_dist () const
 
double sum_idf_goal_dist_sqr () const
 
std::vector< double > GetFeatureVector () const
 
void SetZero ()
 
void MassCentroidFunctional (double const &map_val, Point2 pt)
 
void GoalObjFunctional (double const &map_val, Point2 pt)
 
void ComputeFinalCentroid ()
 

Public Attributes

Point2 site
 
PointVector cell
 
Point2 origin_shift = Point2(0, 0)
 

Detailed Description

Struct for Voronoi cell.

This struct contains the site of the Voronoi cell and the points that make up the cell. Functions are provided to compute the mass and centroid of the cell.

Definition at line 52 of file voronoi.h.

Member Function Documentation

◆ centroid()

Point2 centroid ( ) const
inline

Definition at line 66 of file voronoi.h.

◆ ComputeFinalCentroid()

void ComputeFinalCentroid ( )

Definition at line 41 of file voronoi.cpp.

◆ GetFeatureVector()

std::vector< double > GetFeatureVector ( ) const
inline

Definition at line 73 of file voronoi.h.

◆ GoalObjFunctional()

void GoalObjFunctional ( double const & map_val,
Point2 pt )
inline

Definition at line 96 of file voronoi.h.

◆ mass()

double mass ( ) const
inline

Definition at line 67 of file voronoi.h.

◆ MassCentroidFunctional()

void MassCentroidFunctional ( double const & map_val,
Point2 pt )
inline

Definition at line 89 of file voronoi.h.

◆ SetZero()

void SetZero ( )
inline

Definition at line 80 of file voronoi.h.

◆ sum_idf_goal_dist()

double sum_idf_goal_dist ( ) const
inline

Definition at line 70 of file voronoi.h.

◆ sum_idf_goal_dist_sqr()

double sum_idf_goal_dist_sqr ( ) const
inline

Definition at line 71 of file voronoi.h.

◆ sum_idf_site_dist()

double sum_idf_site_dist ( ) const
inline

Definition at line 68 of file voronoi.h.

◆ sum_idf_site_dist_sqr()

double sum_idf_site_dist_sqr ( ) const
inline

Definition at line 69 of file voronoi.h.

Member Data Documentation

◆ cell

Definition at line 54 of file voronoi.h.

◆ origin_shift

Point2 origin_shift = Point2(0, 0)

Definition at line 55 of file voronoi.h.

◆ site

Point2 site

Definition at line 53 of file voronoi.h.