15 #ifndef PAAL_K_MEDIAN_SOLUTION_HPP
16 #define PAAL_K_MEDIAN_SOLUTION_HPP
22 namespace data_structures {
29 template <
typename voronoiType>
31 utils::return_zero_functor, voronoiType> {
44 typename base::UnchosenFacilitiesSet uf,
int k)
45 :
base(std::move(voronoi), std::move(uf), m_zero_func) {
55 namespace data_structures {
61 template <
typename voronoi>
68 typedef typename VT::VertexType VertexType;
69 typedef typename VT::DistanceType Dist;
70 typedef typename VT::GeneratorsSet ChosenFacilitiesSet;
72 typedef puretype(std::declval<KMS>().get_unchosen_facilities())
73 UnchosenFacilitiesSet;
79 #endif // PAAL_K_MEDIAN_SOLUTION_HPP
default VertexType is int.
Computes size of TypesVector.
describes solution to facility location The initial solution is passed as voronoi, which has to be the model of the Voronoi concept. The generators of the voronoi are the facilities and the vertices are the clients.
#define puretype(t)
for given expression returns its type with removed const and reference
This file contains set of simple useful functors or functor adapters.
simple implementation of the Voronoi concept.
const ChosenFacilitiesSet & get_chosen_facilities() const
setter for unchosen facilities