COIN-OR::LEMON - Graph Library

Changeset 1981:81c8efe92706 in lemon-0.x for lemon


Ignore:
Timestamp:
02/23/06 10:03:18 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2574
Message:

Little bugfixes, spellchecks and improvements

Location:
lemon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_extender.h

    r1979 r1981  
    380380    /// If the given bool is true the given undirected edge and the
    381381    /// returned edge have the same source node.
    382     Edge direct(const UEdge &ue, bool d) const {
     382    static Edge direct(const UEdge &ue, bool d) {
    383383      return Edge(ue, d);
    384384    }
     
    389389    /// \todo reference to the corresponding point of the undirected graph
    390390    /// concept. "What does the direction of an undirected edge mean?"
    391     bool direction(const Edge &e) const { return e.forward; }
     391    static bool direction(const Edge &e) { return e.forward; }
    392392
    393393
  • lemon/dfs.h

    r1956 r1981  
    574574    }
    575575
     576    ///Runs %DFS algorithm to visit all nodes in the graph.
     577   
     578    ///This method runs the %DFS algorithm in order to
     579    ///compute the
     580    ///%DFS path to each node. The algorithm computes
     581    ///- The %DFS tree.
     582    ///- The distance of each node from the root in the %DFS tree.
     583    ///
     584    ///\note d.run() is just a shortcut of the following code.
     585    ///\code
     586    ///  d.init();
     587    ///  for (NodeIt it(graph); it != INVALID; ++it) {
     588    ///    if (!d.reached(it)) {
     589    ///      d.addSource(it);
     590    ///      d.start();
     591    ///    }
     592    ///  }
     593    ///\endcode
     594    void run() {
     595      init();
     596      for (NodeIt it(*G); it != INVALID; ++it) {
     597        if (!reached(it)) {
     598          addSource(it);
     599          start();
     600        }
     601      }
     602    }
     603
    576604    ///Runs %DFS algorithm from node \c s.
    577605   
     
    652680    ///Returns the distance of a node from the root(s).
    653681    ///\pre \ref run() must be called before using this function.
    654     ///\warning If node \c v is unreachable from the root(s) then the return value
    655     ///of this funcion is undefined.
     682    ///\warning If node \c v is unreachable from the root(s) then the return
     683    ///value of this funcion is undefined.
    656684    int dist(Node v) const { return (*_dist)[v]; }
    657685
     
    14411469    }
    14421470
    1443     /// \brief Runs %DFS algorithm from node \c s.
     1471    /// \brief Runs %DFSVisit algorithm from node \c s.
    14441472    ///
    14451473    /// This method runs the %DFS algorithm from a root node \c s.
     
    14551483      start();
    14561484    }
     1485
     1486    /// \brief Runs %DFSVisit algorithm to visit all nodes in the graph.
     1487   
     1488    /// This method runs the %DFS algorithm in order to
     1489    /// compute the %DFS path to each node. The algorithm computes
     1490    /// - The %DFS tree.
     1491    /// - The distance of each node from the root in the %DFS tree.
     1492    ///
     1493    ///\note d.run() is just a shortcut of the following code.
     1494    ///\code
     1495    ///  d.init();
     1496    ///  for (NodeIt it(graph); it != INVALID; ++it) {
     1497    ///    if (!d.reached(it)) {
     1498    ///      d.addSource(it);
     1499    ///      d.start();
     1500    ///    }
     1501    ///  }
     1502    ///\endcode
     1503    void run() {
     1504      init();
     1505      for (NodeIt it(*_graph); it != INVALID; ++it) {
     1506        if (!reached(it)) {
     1507          addSource(it);
     1508          start();
     1509        }
     1510      }
     1511    }
    14571512    ///@}
    14581513
  • lemon/dijkstra.h

    r1956 r1981  
    485485    ///If you don't use this function before calling \ref run(),
    486486    ///it will allocate one. The destuctor deallocates this
    487     ///automatically allocated map, of course.
     487    ///automatically allocated heap and cross reference, of course.
    488488    ///\return <tt> (*this) </tt>
    489489    Dijkstra &heap(Heap& heap, HeapCrossRef &crossRef)
  • lemon/graph_utils.h

    r1956 r1981  
    567567    }
    568568
    569     void run() {}
     569    void run() const {}
    570570
    571571  private:
     
    778778    }
    779779
    780     void run() {}
     780    void run() const {}
    781781
    782782  private:
Note: See TracChangeset for help on using the changeset viewer.