GridGraph Class Reference
[Graph Structures]

#include <lemon/grid_graph.h>

Inherits StaticMappableUGraphExtender< IterableUGraphExtender< AlterableUGraphExtender< UGraphExtender< GridGraphBase > > > >.

Inheritance diagram for GridGraph:

Inheritance graph
[legend]
List of all members.

Detailed Description

This class implements a special graph type. The nodes of the graph can be indiced by two integer (i,j) value where i is in the [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:

      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) {
          val[graph(i, j)] = i + j;
        }
      }

The graph type is fully conform to the Undirected Graph concept.

Author:
Balazs Dezso
See also:
GridGraphBase


Public Member Functions

 GridGraph (int n, int m)
 Constructor.
Edge down (Node n) const
 Gives back the edge goes down from the node.
Edge up (Node n) const
 Gives back the edge goes up from the node.
Edge right (Node n) const
 Gives back the edge goes right from the node.
Edge left (Node n) const
 Gives back the edge goes left from the node.

Classes

class  ColMap
 Map to get the column of the nodes. More...
class  IndexMap
 Map to get the indices of the nodes as xy<int>. More...
class  RowMap
 Map to get the row of the nodes. More...


Member Function Documentation

Edge down Node  n  )  const [inline]
 

Gives back the edge goes down from the node. If there is not outgoing edge then it gives back INVALID.

Edge up Node  n  )  const [inline]
 

Gives back the edge goes up from the node. If there is not outgoing edge then it gives back INVALID.

Edge right Node  n  )  const [inline]
 

Gives back the edge goes right from the node. If there is not outgoing edge then it gives back INVALID.

Edge left Node  n  )  const [inline]
 

Gives back the edge goes left from the node. If there is not outgoing edge then it gives back INVALID.


The documentation for this class was generated from the following file:
Generated on Fri Feb 3 18:41:39 2006 for LEMON by  doxygen 1.4.6