Bug fix
authordeba
Wed, 14 Dec 2005 18:11:03 +0000
changeset 1859075aaa0a4e6f
parent 1858 a5b6d941ed52
child 1860 27a9a75b957b
Bug fix
and doc fix
lemon/grid_graph.h
     1.1 --- a/lemon/grid_graph.h	Wed Dec 14 18:07:28 2005 +0000
     1.2 +++ b/lemon/grid_graph.h	Wed Dec 14 18:11:03 2005 +0000
     1.3 @@ -228,7 +228,7 @@
     1.4      /// It finds the first edge from \c u to \c v. Otherwise it looks for
     1.5      /// the next edge from \c u to \c v after \c prev.
     1.6      /// \return The found edge or INVALID if there is no such an edge.
     1.7 -    Edge findEdge(Node u, Node v, Edge prev = INVALID) {
     1.8 +    Edge findEdge(Node u, Node v, Edge prev = INVALID) const {
     1.9        if (prev != INVALID) return INVALID;
    1.10        if (v.id - u.id == _width) return Edge(u.id);
    1.11        if (v.id - u.id == 1 && u.id % _width < _width - 1) {
    1.12 @@ -349,13 +349,13 @@
    1.13    ///
    1.14    /// This class implements a special graph type. The nodes of the
    1.15    /// graph can be indiced by two integer \c (i,j) value where \c i
    1.16 -  /// is in the \c [0,height) range and j is in the [0, width) range.
    1.17 +  /// is in the \c [0,width) range and j is in the [0, height) range.
    1.18    /// Two nodes are connected in the graph if the indices differ only
    1.19    /// on one position and only one is the difference. 
    1.20    ///
    1.21    /// The graph can be indiced in the following way:
    1.22    /// \code
    1.23 -  /// GridGraph graph(h, w);
    1.24 +  /// GridGraph graph(w, h);
    1.25    /// GridGraph::NodeMap<int> val(graph); 
    1.26    /// for (int i = 0; i < graph.width(); ++i) {
    1.27    ///   for (int j = 0; j < graph.height(); ++j) {
    1.28 @@ -453,6 +453,9 @@
    1.29        const GridGraph& graph;
    1.30      };
    1.31  
    1.32 +    /// \brief Constructor
    1.33 +    ///
    1.34 +    /// 
    1.35      GridGraph(int n, int m) { construct(n, m); }
    1.36      
    1.37      /// \brief Gives back the edge goes down from the node.