public class StructurallyEquivalent extends java.lang.Object implements EquivalenceAlgorithm
Modifier and Type | Field and Description |
---|---|
static int |
count |
Constructor and Description |
---|
StructurallyEquivalent() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canpossiblycompare(Vertex v1,
Vertex v2)
This is a space for optimizations.
|
java.util.Set |
checkEquivalent(Graph g)
For each vertex pair v, v1 in G, checks whether v and v1 are fully
equivalent: meaning that they connect to the exact same vertices.
|
protected EquivalenceRelation |
createEquivalenceClasses(Graph g,
java.util.Set s)
Takes in a Set of Pairs (as in the resutls of checkEquivalent) and
massages into a Set of Sets, where each Set is an equivalence class.
|
EquivalenceRelation |
getEquivalences(Graph g)
Runs the equivalence algorithm on the given graph,
and returns an equivalence relation.
|
static StructurallyEquivalent |
getInstance() |
protected boolean |
isStructurallyEquivalent(Vertex v1,
Vertex v2)
Checks whether a pair of vertices are structurally equivalent.
|
public static StructurallyEquivalent getInstance()
public EquivalenceRelation getEquivalences(Graph g)
EquivalenceAlgorithm
getEquivalences
in interface EquivalenceAlgorithm
g
- the graph to be checked for equivalenceprotected EquivalenceRelation createEquivalenceClasses(Graph g, java.util.Set s)
public java.util.Set checkEquivalent(Graph g)
g
- protected boolean isStructurallyEquivalent(Vertex v1, Vertex v2)
v1
- v2
-