3 Copyright (c) Matyas Egyhazy 2008
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt)
9 <Title>Boost Graph Library: tsp_tour_len_visitor
</Title>
10 <BODY BGCOLOR=
"#ffffff" LINK=
"#0000ee" TEXT=
"#000000" VLINK=
"#551a8b"
12 <IMG SRC=
"../../../boost.png"
13 ALT=
"C++ Boost" width=
"277" height=
"86">
19 tsp_tour_len_visitor
<Graph, WeightMap, OutputIterator, Length
>
23 This type is a TSP tour visitor. It supplies the OutputIterator with the vertices of the tour and
24 records the total length of the tour.
30 std::vector
<Vertex
> c;
31 boost::metric_tsp_approx
32 (g, get(edge_weight, g),
33 make_tsp_tour_len_visitor(g, std::back_inserter(c), d, get(edge_weight, g)));
39 <a href=
"./TSPTourVisitor.html">TSP Tour Visitor
</a>
41 <H3>Template Parameters
</H3>
46 <th>Parameter
</th><th>Description
</th><th>Default
</th>
49 <TR><TD><TT>Graph
</TT></TD>
56 <TR><TD><TT>WeightMap
</TT></TD>
58 The weight of each edge in the graph.
59 The type
<tt>WeightMap
</tt> must be a model of
60 <a href=
"../../property_map/doc/ReadablePropertyMap.html">Readable Property Map
</a>.
61 The edge descriptor type of the graph needs to be usable as the key type for the weight map.
66 <TR><TD><TT>OutputIterator
</TT></TD>
73 <TR><TD><TT>Length
</TT></TD>
75 A suitable container for the length of the tour. It must implement additive operators.
82 <H3>Where Defined
</H3>
85 <a href=
"../../../boost/graph/metric_tsp_approx.hpp">
86 <TT>boost/graph/metric_tsp_approx.hpp
</TT></a>
88 <h3>Member Functions
</h3>
90 This class implements all of the member functions required by
<a
91 href=
"./TSPTourVisitor.html">TSPTourVisitor
</a>.
93 <h3>Non-Member Functions
</h3>
97 <th>Function
</th><th>Description
</th>
101 template
<typename Graph, typename WeightMap, typename OutputIterator, typename Length
><br>
102 tsp_tour_len_visitor
<OutputIterator
><br>
103 make_tsp_tour_len_visitor(Graph const& g, OutIter iter, Length& l, WeightMap map)
105 Returns a tour_len_visitor that records the TSP tour in the OutputIterator parameter and the length of the tour in the Length parameter.
118 <TD nowrap
>Copyright
© 2008</TD><TD>