This class is assigning vertices demands to capacitated generators in such a way that the total cost is minimized. The solution is based on the min cost max flow algorithm. More...
#include <capacitated_voronoi.hpp>
Classes | |
class | Dist |
this class store as a distance: More... | |
Public Types | |
typedef Dist::DistI | DistI |
typedef metric_traits< Metric > ::VertexType | VertexType |
typedef std::set< VertexType > | Generators |
typedef std::vector< VertexType > | Vertices |
Public Member Functions | |
capacitated_voronoi (const Generators &gen, Vertices ver, const Metric &m, const GeneratorsCapacieties &gc, const VerticesDemands &vd, DistI costOfNoGenerator=std::numeric_limits< DistI >::max()) | |
constructor More... | |
capacitated_voronoi (const capacitated_voronoi &other) | |
copy constructor is not default because of rev graph property More... | |
Dist | add_generator (VertexType gen) |
returns diff between new cost and old cost | |
Dist | rem_generator (VertexType gen) |
returns diff between new cost and old cost | |
const Generators & | get_generators () const |
getter for generators More... | |
const Vertices & | get_vertices () const |
getter for vertices More... | |
boost::iterator_range < VForGenerator > | get_vertices_for_generator (VertexType gen) const |
member function for getting assignment, for generator. More... | |
Dist | get_cost () const |
get total cost of the assignment More... | |
Friends | |
template<typename OStream > | |
OStream & | operator<< (OStream &s, capacitated_voronoi &v) |
operator<< More... | |
This class is assigning vertices demands to capacitated generators in such a way that the total cost is minimized. The solution is based on the min cost max flow algorithm.
Metric | |
GeneratorsCapacieties | is a functor which for each Generator returns its capacity . |
VerticesDemands | is a functor which for each vertex returns its demand. |
Definition at line 47 of file capacitated_voronoi.hpp.
|
inline |
constructor
gen | |
ver | |
m | |
gc | |
vd | |
costOfNoGenerator |
Definition at line 233 of file capacitated_voronoi.hpp.
|
inline |
copy constructor is not default because of rev graph property
other |
Definition at line 257 of file capacitated_voronoi.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
member function for getting assignment, for generator.
Definition at line 352 of file capacitated_voronoi.hpp.
|
friend |
operator<<
OStream |
s | |
v |
Definition at line 388 of file capacitated_voronoi.hpp.