|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.graph.generate.GridGraphGenerator<N,E>
N - the type of the nodes.E - the type of the edges.public final class GridGraphGenerator<N,E>
Generates a grid graph where every node is connected to each of its neighbouring nodes in the grid.
| Nested Class Summary | |
|---|---|
static class |
GridGraphGenerator.Coordinate
Represents the coordinate of a node in the grid graph, i.e. the row and column of the node. |
| Constructor Summary | |
|---|---|
GridGraphGenerator(Graph<N,E> graph,
int rows,
int cols)
Constructor. |
|
| Method Summary | |
|---|---|
GridGraphGenerator.Coordinate |
getCoord(N node)
Returns the coordinate of the given node in the grid graph, i.e. the row and column of the node. |
N |
getNode(int i,
int j)
Get the node that has the given coordinates in the grid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GridGraphGenerator(Graph<N,E> graph,
int rows,
int cols)
graph - the graph for which a grid graph shall be created.rows - the number of rows in the grid.cols - the number of columns in the grid.| Method Detail |
|---|
public N getNode(int i,
int j)
i - the first coordinate.j - the second coordinate.
public GridGraphGenerator.Coordinate getCoord(N node)
node - the node for which to return the coordinates
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||