[Lemon-commits] [lemon_svn] deba: r2431 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:52:34 CET 2006
Author: deba
Date: Wed Dec 14 19:11:03 2005
New Revision: 2431
Modified:
hugo/trunk/lemon/grid_graph.h
Log:
Bug fix
and doc fix
Modified: hugo/trunk/lemon/grid_graph.h
==============================================================================
--- hugo/trunk/lemon/grid_graph.h (original)
+++ hugo/trunk/lemon/grid_graph.h Wed Dec 14 19:11:03 2005
@@ -228,7 +228,7 @@
/// It finds the first edge from \c u to \c v. Otherwise it looks for
/// the next edge from \c u to \c v after \c prev.
/// \return The found edge or INVALID if there is no such an edge.
- Edge findEdge(Node u, Node v, Edge prev = INVALID) {
+ Edge findEdge(Node u, Node v, Edge prev = INVALID) const {
if (prev != INVALID) return INVALID;
if (v.id - u.id == _width) return Edge(u.id);
if (v.id - u.id == 1 && u.id % _width < _width - 1) {
@@ -349,13 +349,13 @@
///
/// This class implements a special graph type. The nodes of the
/// graph can be indiced by two integer \c (i,j) value where \c i
- /// is in the \c [0,height) range and j is in the [0, width) range.
+ /// is in the \c [0,width) range and j is in the [0, height) range.
/// Two nodes are connected in the graph if the indices differ only
/// on one position and only one is the difference.
///
/// The graph can be indiced in the following way:
/// \code
- /// GridGraph graph(h, w);
+ /// GridGraph graph(w, h);
/// GridGraph::NodeMap<int> val(graph);
/// for (int i = 0; i < graph.width(); ++i) {
/// for (int j = 0; j < graph.height(); ++j) {
@@ -453,6 +453,9 @@
const GridGraph& graph;
};
+ /// \brief Constructor
+ ///
+ ///
GridGraph(int n, int m) { construct(n, m); }
/// \brief Gives back the edge goes down from the node.
More information about the Lemon-commits
mailing list