tsp_tour_len_visitor<Graph, WeightMap, OutputIterator, Length>
double d(0.0); std::vector<Vertex> c; boost::metric_tsp_approx (g, get(edge_weight, g), make_tsp_tour_len_visitor(g, std::back_inserter(c), d, get(edge_weight, g)));
| Parameter | Description | Default |
|---|---|---|
| Graph | The graph type | None |
| WeightMap | The weight of each edge in the graph. The type WeightMap must be a model of Readable Property Map. The edge descriptor type of the graph needs to be usable as the key type for the weight map. | None |
| OutputIterator | An OutputIterator | None |
| Length | A suitable container for the length of the tour. It must implement additive operators. | None |
boost/graph/metric_tsp_approx.hpp
| Function | Description |
|---|---|
|
template <typename Graph, typename WeightMap, typename OutputIterator, typename Length> tsp_tour_len_visitor<OutputIterator> make_tsp_tour_len_visitor(Graph const& g, OutIter iter, Length& l, WeightMap map) | Returns a tour_len_visitor that records the TSP tour in the OutputIterator parameter and the tour's length in the Length parameter. |
| Copyright © 2008 | Matyas Egyhazy |