|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.cluster.ClusterSet
public abstract class ClusterSet
A data structure representing the clusters, connected set of vertices (or edges), in a graph. The clusters can be retrieved based upon their position index in the collection. Also, given a vertex (or edge) the corresponding clusters can be retrieved. There is no requirement that the union of the set of vertices (or edges) in each cluster needs to equal the set of all vertices in the graph.
Constructor Summary | |
---|---|
ClusterSet(ArchetypeGraph underlyingGraph)
Creates a new instance. |
Method Summary | |
---|---|
void |
addCluster(Set elements)
Adds a new cluster to the collection. |
protected void |
checkLegality(Element e)
|
abstract ClusterSet |
createEquivalentClusterSet(Graph anotherGraph)
Returns the corresponding cluster set in the other graph. |
Set |
getCluster(int index)
Given the cluster's position in the list (0-based), retrieve the cluster (set of vertices) |
abstract Graph |
getClusterAsNewSubGraph(int index)
Constructs a new graph from the given cluster |
Set |
getClusters(Element element)
Given a vertex (or edge), retrieves the clusters which that vertex (or edge) belongs to if any |
ArchetypeGraph |
getUnderlyingGraph()
|
Iterator |
iterator()
Returns an iterator to the component list. |
int |
size()
the size of the cluster collection. |
void |
sort()
Sorts the clusters by size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClusterSet(ArchetypeGraph underlyingGraph)
Method Detail |
---|
public void addCluster(Set elements)
elements
- the set of vertices (or edges) comprising a component to be addedprotected void checkLegality(Element e)
public abstract Graph getClusterAsNewSubGraph(int index)
index
- the position index of the cluster in the collection
public abstract ClusterSet createEquivalentClusterSet(Graph anotherGraph)
anotherGraph
- another graph whose corresponding clusters are to be retrieved
public Set getClusters(Element element)
element
- the vertex (or edge) whose cluster is to be retrieved.
public Set getCluster(int index)
index
- the 0-based index of the cluster in the list.
public Iterator iterator()
public int size()
public void sort()
public ArchetypeGraph getUnderlyingGraph()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |