N
 The class representing the nodes of the graphE
 The class representing the edges of the graphpublic class ClusterGraph<N,E> extends AbstractGraph<N,E>
Graph.Segment<N,E>
Constructor and Description 

ClusterGraph(boolean directedFlag)
Instantiates a new cluster graph.

ClusterGraph(Graph<? extends N,? extends E> graph)
Instantiates a new cluster graph, loading the nodes and edges from the
specified graph.

Modifier and Type  Method and Description 

boolean 
add(N node)
Add a node to the ClusterGraph.

boolean 
addEdge(E edge,
N orig,
N dest)
Add an edge to the ClusterGraph.

Graph<N,E> 
getCluster(N node)
Get the cluster that a particular node is contained in

java.util.Set<Graph<N,E>> 
getClusterSet()
Returns a list of the clusters in this graph.

E 
getEdge(N n1,
N n2)
Get the edge between two nodes.

Graph.Segment<N,E> 
getEdgeSegment(E edge)
Get the edge segment for the specified edge.

java.util.Set<E> 
getEdgeSet()
Get the set of edges for this graph.

Graph<N,E> 
getLargestCluster()
Get the largest cluster in this graph.

int 
getMaxDistance(N node)
finds the greatest distance from node to any other node in the
graph.

N 
getMostConnected()
Returns the node with the most connections in this graph.

java.util.Set<N> 
getNodeSet()
Get the set of nodes for this graph.

java.util.Set<Graph.Segment<N,E>> 
getSegmentSet()
Get the set of edge segments for this graph.

boolean 
isDirected()
Return whether this graph is a directed graph.

boolean 
remove(java.lang.Object obj)
Remove an object from the graph.

boolean 
removeEdge(java.lang.Object obj)
Remove the edge from the graph.

java.lang.String 
toString()
Returns a string representation of the graph.

addAll, clear, contains, containsEdge, edgeIterator, equals, getNodeEdges, hashCode, isEmpty, iterator, order, size
public ClusterGraph(boolean directedFlag)
directedFlag
 the directed flagpublic ClusterGraph(Graph<? extends N,? extends E> graph)
graph
 the graph to initially load into this ClusterGraphpublic boolean add(N node)
node
 the node to addpublic boolean addEdge(E edge, N orig, N dest)
edge
 the edge to addorig
 the origin node for the edgedest
 the destination node for the edgepublic Graph<N,E> getCluster(N node)
node
 The nodepublic java.util.Set<Graph<N,E>> getClusterSet()
public E getEdge(N n1, N n2)
n1
 The first noden2
 The second nodepublic Graph.Segment<N,E> getEdgeSegment(E edge)
edge
 the edgepublic java.util.Set<E> getEdgeSet()
public Graph<N,E> getLargestCluster()
public int getMaxDistance(N node)
node
 the node to check distance frompublic N getMostConnected()
public java.util.Set<N> getNodeSet()
public java.util.Set<Graph.Segment<N,E>> getSegmentSet()
public boolean isDirected()
isDirected
in interface Graph<N,E>
isDirected
in class AbstractGraph<N,E>
public boolean remove(java.lang.Object obj)
public boolean removeEdge(java.lang.Object obj)
removeEdge
in interface Graph<N,E>
removeEdge
in class AbstractGraph<N,E>
obj
 the objpublic java.lang.String toString()
toString
in class java.lang.Object