public class EquivalenceRelation
extends java.lang.Object
Constructor and Description |
---|
EquivalenceRelation(java.util.Set rv,
Graph g)
Input is the basic data structure underneath: a Set of Sets.
|
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
getAllEquivalences()
Iterates through all the equivalence sets.
|
java.util.Set |
getEquivalenceRelationContaining(Vertex v)
Returns the part of the relation that contains this vertex: it is, of course, a Set
If the vertex does not belong to any relation, null is returned.
|
Graph |
getGraph()
Returns the common graph to which all the vertices belong
|
java.util.Set |
getSingletonVertices()
Returns the set of vertices that do not belong to an particular equivalence class.
|
int |
numRelations()
Returns the number of relations defined.
|
java.lang.String |
toString() |
public EquivalenceRelation(java.util.Set rv, Graph g)
public Graph getGraph()
public java.util.Set getSingletonVertices()
public java.util.Iterator getAllEquivalences()
public java.util.Set getEquivalenceRelationContaining(Vertex v)
public int numRelations()
public java.lang.String toString()
toString
in class java.lang.Object