nanomunchers.graph
Interface Graph

All Known Implementing Classes:
GridGraph

public interface Graph

Author:
David Kaplin

Method Summary
 void clear()
          Clears any marked nodes on the graph.
 Graph[] getConnectedComponents()
           
 int getHeight()
           
 Edge[] getNeighbors(Node n)
           
 Node[] getNodes()
           
 Edge[] getUniqueEdges()
           
 int getWidth()
           
 

Method Detail

getNodes

public Node[] getNodes()
Returns:
the nodes that make up a graph.

getUniqueEdges

public Edge[] getUniqueEdges()
Returns:
if the graph contians bi-directional edges return only (A,B) as opposed to (A,B) and (B,A)

getConnectedComponents

public Graph[] getConnectedComponents()
Returns:
Subgraphs that are strongly connected.

getWidth

public int getWidth()
Returns:
largest span of nodes in width

getHeight

public int getHeight()
Returns:
largest span of nodes in height

clear

public void clear()
Clears any marked nodes on the graph.


getNeighbors

public Edge[] getNeighbors(Node n)
Parameters:
n - node to start at