Changeset 1205:d3dcc49e6403 in lemon for lemon/insertion_tsp.h
- Timestamp:
- 02/28/13 17:13:14 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/insertion_tsp.h
r1204 r1205 204 204 /// 205 205 /// This function copies the node sequence of the found tour into 206 /// the given standard container. 206 /// an STL container through the given output iterator. The 207 /// <tt>value_type</tt> of the container must be <tt>FullGraph::Node</tt>. 208 /// For example, 209 /// \code 210 /// std::vector<FullGraph::Node> nodes(countNodes(graph)); 211 /// tsp.tourNodes(nodes.begin()); 212 /// \endcode 213 /// or 214 /// \code 215 /// std::list<FullGraph::Node> nodes; 216 /// tsp.tourNodes(std::back_inserter(nodes)); 217 /// \endcode 207 218 /// 208 219 /// \pre run() must be called before using this function. 209 template <typename Container>210 void tourNodes( Container &container) const {211 container.assign(_tour.begin(), _tour.end());220 template <typename Iterator> 221 void tourNodes(Iterator out) const { 222 std::copy(_tour.begin(), _tour.end(), out); 212 223 } 213 224
Note: See TracChangeset
for help on using the changeset viewer.