lemon/insertion_tsp.h
changeset 1034 ef200e268af2
parent 1033 9a51db038228
child 1036 dff32ce3db71
equal deleted inserted replaced
1:18daff527600 2:53efd5c9a659
    28 #include <lemon/maps.h>
    28 #include <lemon/maps.h>
    29 #include <lemon/random.h>
    29 #include <lemon/random.h>
    30 
    30 
    31 namespace lemon {
    31 namespace lemon {
    32 
    32 
       
    33   /// \ingroup tsp
       
    34   ///
    33   /// \brief Insertion algorithm for symmetric TSP.
    35   /// \brief Insertion algorithm for symmetric TSP.
    34   ///
    36   ///
    35   /// InsertionTsp implements the insertion heuristic for solving
    37   /// InsertionTsp implements the insertion heuristic for solving
    36   /// symmetric \ref tsp "TSP".
    38   /// symmetric \ref tsp "TSP".
    37   ///
    39   ///
    72       /// Enum type containing constants for specifying the node selection
    74       /// Enum type containing constants for specifying the node selection
    73       /// rule for the \ref run() function.
    75       /// rule for the \ref run() function.
    74       ///
    76       ///
    75       /// During the algorithm, nodes are selected for addition to the current
    77       /// During the algorithm, nodes are selected for addition to the current
    76       /// subtour according to the applied rule.
    78       /// subtour according to the applied rule.
    77       /// In general, the FARTHEST yields the best tours, thus it is the
    79       /// In general, the FARTHEST method yields the best tours, thus it is the
    78       /// default option. RANDOM usually gives somewhat worse results, but
    80       /// default option. The RANDOM rule usually gives somewhat worse results,
    79       /// it is much faster than the others and it is the most robust.
    81       /// but it is much faster than the others and it is the most robust.
    80       ///
    82       ///
    81       /// The desired selection rule can be specified as a parameter of the
    83       /// The desired selection rule can be specified as a parameter of the
    82       /// \ref run() function.
    84       /// \ref run() function.
    83       enum SelectionRule {
    85       enum SelectionRule {
    84 
    86 
   176       }
   178       }
   177 
   179 
   178       /// \brief Returns a const reference to the node sequence of the
   180       /// \brief Returns a const reference to the node sequence of the
   179       /// found tour.
   181       /// found tour.
   180       ///
   182       ///
   181       /// This function returns a const reference to the internal structure
   183       /// This function returns a const reference to a vector
   182       /// that stores the node sequence of the found tour.
   184       /// that stores the node sequence of the found tour.
   183       ///
   185       ///
   184       /// \pre run() must be called before using this function.
   186       /// \pre run() must be called before using this function.
   185       const std::vector<Node>& tourNodes() const {
   187       const std::vector<Node>& tourNodes() const {
   186         return _path;
   188         return _path;