GridGraph

GridGraph[{m, n}]
gives the grid graph with vertices .

GridGraph[{n1, n2, ..., nk}]
gives the -dimensional grid graph with vertices .

Details and OptionsDetails and Options

  • GridGraph[{n1, n2, ..., nk}] gives a graph connected as a -dimensional grid with vertices in dimension 1, vertices in dimension 2, etc.
  • GridGraph[{n1, n2, ..., nk}, DirectedEdges->True] gives a directed grid graph.
  • GridGraph takes the same options as Graph.
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »