Changeset 1205:d3dcc49e6403 in lemon for lemon/opt2_tsp.h
- Timestamp:
- 02/28/13 17:13:14 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/opt2_tsp.h
r1204 r1205 231 231 /// 232 232 /// This function copies the node sequence of the found tour into 233 /// the given standard container. 233 /// an STL container through the given output iterator. The 234 /// <tt>value_type</tt> of the container must be <tt>FullGraph::Node</tt>. 235 /// For example, 236 /// \code 237 /// std::vector<FullGraph::Node> nodes(countNodes(graph)); 238 /// tsp.tourNodes(nodes.begin()); 239 /// \endcode 240 /// or 241 /// \code 242 /// std::list<FullGraph::Node> nodes; 243 /// tsp.tourNodes(std::back_inserter(nodes)); 244 /// \endcode 234 245 /// 235 246 /// \pre run() must be called before using this function. 236 template <typename Container>237 void tourNodes( Container &container) const {238 container.assign(_path.begin(), _path.end());247 template <typename Iterator> 248 void tourNodes(Iterator out) const { 249 std::copy(_path.begin(), _path.end(), out); 239 250 } 240 251
Note: See TracChangeset
for help on using the changeset viewer.