public interface State
AbstractIsomorphismTester
to detect
isomorphism in a general manner while leaving the algorithm specifics
isolated to a State
implementation.Modifier and Type | Field and Description |
---|---|
static int |
NULL_NODE
The node marker to be used when indicating that that no node is being
matched.
|
Modifier and Type | Method and Description |
---|---|
void |
addPair(int n1,
int n2)
Adds the two vertices to this
State 's vertex mapping. |
void |
backTrack()
Undoes the mapping added in the prior call to
addPair . |
State |
copy()
Makes a shallow copy of the content of this state.
|
Graph<? extends Edge> |
getGraph1()
Returns the first graph being matched
|
Graph<? extends Edge> |
getGraph2()
Returns the first graph being matched
|
Map<Integer,Integer> |
getVertexMapping()
Returns the current mapping between vertices.
|
boolean |
isDead()
Returns
true if the current state of mapping cannot proceed
because some invalid mapping has occurred and no further pairs would
result in an isomorphic match. |
boolean |
isFeasiblePair(int node1,
int node2)
Returns
true if mapping node1 to node2 would
preseve the isomorphism between the graphs to the extend that their
vertices have been mapped thusfar. |
boolean |
isGoal()
Returns
true if all the vertices have been mapped. |
Pair<Integer> |
nextPair(int prevN1,
int prevN2)
Returns the next candidate for isomorphic matching given these prior two
vertices that were matched.
|
static final int NULL_NODE
Pair<Integer> nextPair(int prevN1, int prevN2)
prevN1
and prevN1
are
NULL_NODE
, this should return the initial candidate.void addPair(int n1, int n2)
State
's vertex mapping.boolean isFeasiblePair(int node1, int node2)
true
if mapping node1
to node2
would
preseve the isomorphism between the graphs to the extend that their
vertices have been mapped thusfar.boolean isGoal()
true
if all the vertices have been mapped. Equivalently,
returns true
if the graphs are isomorphic.boolean isDead()
true
if the current state of mapping cannot proceed
because some invalid mapping has occurred and no further pairs would
result in an isomorphic match.Map<Integer,Integer> getVertexMapping()
State copy()
void backTrack()
addPair
.Copyright © 2012. All Rights Reserved.