lemon/opt2_tsp.h
changeset 1051 4f9a45a6d6f0
parent 1036 dff32ce3db71
child 1074 97d978243703
equal deleted inserted replaced
3:fa2c63a87bd6 4:1dddfbedda69
   228       }
   228       }
   229 
   229 
   230       /// \brief Gives back the node sequence of the found tour.
   230       /// \brief Gives back the node sequence of the found tour.
   231       ///
   231       ///
   232       /// This function copies the node sequence of the found tour into
   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       /// \pre run() must be called before using this function.
   246       /// \pre run() must be called before using this function.
   236       template <typename Container>
   247       template <typename Iterator>
   237       void tourNodes(Container &container) const {
   248       void tourNodes(Iterator out) const {
   238         container.assign(_path.begin(), _path.end());
   249         std::copy(_path.begin(), _path.end(), out);
   239       }
   250       }
   240 
   251 
   241       /// \brief Gives back the found tour as a path.
   252       /// \brief Gives back the found tour as a path.
   242       ///
   253       ///
   243       /// This function copies the found tour as a list of arcs/edges into
   254       /// This function copies the found tour as a list of arcs/edges into