Changeset 1202:ef200e268af2 in lemon for lemon/opt2_tsp.h
- Timestamp:
- 01/09/11 00:56:52 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/opt2_tsp.h
r1201 r1202 22 22 /// \ingroup tsp 23 23 /// \file 24 /// \brief 2-opt algorithm for symmetric TSP 24 /// \brief 2-opt algorithm for symmetric TSP. 25 25 26 26 #include <vector> … … 29 29 namespace lemon { 30 30 31 /// \ingroup tsp 32 /// 31 33 /// \brief 2-opt algorithm for symmetric TSP. 32 34 /// … … 115 117 } 116 118 117 /// \brief Runs the algorithm from the given tour.119 /// \brief Runs the algorithm starting from the given tour. 118 120 /// 119 121 /// This function runs the algorithm starting from the given tour. … … 157 159 } 158 160 159 /// \brief Runs the algorithm from the given tour. 160 /// 161 /// This function runs the algorithm starting from the given tour. 162 /// 163 /// \param tour The tour as a node sequence. It must be a standard 164 /// sequence container storing all <tt>Node</tt>s in the desired order. 161 /// \brief Runs the algorithm starting from the given tour. 162 /// 163 /// This function runs the algorithm starting from the given tour 164 /// (node sequence). 165 /// 166 /// \param tour A vector that stores all <tt>Node</tt>s of the graph 167 /// in the desired order. 165 168 /// 166 169 /// \return The total cost of the found tour. 167 template <template <typename> class Container> 168 Cost run(const Container<Node>& tour) { 170 Cost run(const std::vector<Node>& tour) { 169 171 _path.clear(); 170 172 … … 181 183 182 184 _plist.resize(2*_gr.nodeNum()); 183 typename Container<Node>::const_iterator it = tour.begin();185 typename std::vector<Node>::const_iterator it = tour.begin(); 184 186 int first = _gr.id(*it), 185 187 prev = first, … … 218 220 /// found tour. 219 221 /// 220 /// This function returns a const reference to the internal structure222 /// This function returns a const reference to a vector 221 223 /// that stores the node sequence of the found tour. 222 224 ///
Note: See TracChangeset
for help on using the changeset viewer.