352 /// is in the \c [0,width) range and j is in the [0, height) range. |
352 /// is in the \c [0,width) range and j is in the [0, height) range. |
353 /// Two nodes are connected in the graph if the indices differ only |
353 /// Two nodes are connected in the graph if the indices differ only |
354 /// on one position and only one is the difference. |
354 /// on one position and only one is the difference. |
355 /// |
355 /// |
356 /// The graph can be indiced in the following way: |
356 /// The graph can be indiced in the following way: |
357 /// \code |
357 ///\code |
358 /// GridGraph graph(w, h); |
358 /// GridGraph graph(w, h); |
359 /// GridGraph::NodeMap<int> val(graph); |
359 /// GridGraph::NodeMap<int> val(graph); |
360 /// for (int i = 0; i < graph.width(); ++i) { |
360 /// for (int i = 0; i < graph.width(); ++i) { |
361 /// for (int j = 0; j < graph.height(); ++j) { |
361 /// for (int j = 0; j < graph.height(); ++j) { |
362 /// val[graph(i, j)] = i + j; |
362 /// val[graph(i, j)] = i + j; |
363 /// } |
363 /// } |
364 /// } |
364 /// } |
365 /// \endcode |
365 ///\endcode |
366 /// |
366 /// |
367 /// The graph type is fully conform to the \ref concept::UGraph |
367 /// The graph type is fully conform to the \ref concept::UGraph |
368 /// "Undirected Graph" concept. |
368 /// "Undirected Graph" concept. |
369 /// |
369 /// |
370 /// \author Balazs Dezso |
370 /// \author Balazs Dezso |