Package org.graph4j.isomorphism
Class UllmanExactState
java.lang.Object
org.graph4j.isomorphism.AbstractState
org.graph4j.isomorphism.AbstractUllmanState
org.graph4j.isomorphism.UllmanExactState
- All Implemented Interfaces:
State
Class for the Ullman algorithm for exact graph isomorphism.
Two vertices are compatible if they have the same degree and same labels.
- Author:
- Ignat Gabriel-Andrei
-
Field Summary
Fields inherited from class org.graph4j.isomorphism.AbstractUllmanState
COMPATIBLE, M, prev_1, prev_2 -
Constructor Summary
ConstructorsConstructorDescriptionUllmanExactState(Digraph g1, Digraph g2) UllmanExactState(Digraph g1, Digraph g2, boolean cache) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexactOrSubgraphIsomorphismCompatibilityCheck(int vertexIndex1, int vertexIndex2) For exact isomorphism, two vertices are compatible if they have the same degree.booleanisDead()A partial mapping is "dead" if there is a vertex from the first graph that has no compatible vertex in the second graph.booleanisGoal()For exact isomorphism, a mapping is complete when all vertices from both graphs are mapped.Methods inherited from class org.graph4j.isomorphism.AbstractUllmanState
addPair, backTrack, existsCandidateNeighbourInSecondGraph, getCandidates, isFeasiblePair, nextPair, resetPreviousVerticesMethods inherited from class org.graph4j.isomorphism.AbstractState
compatibleEdges, compatibleVertices, getCoreLen, getMapping
-
Constructor Details
-
UllmanExactState
-
UllmanExactState
-
UllmanExactState
-
-
Method Details
-
exactOrSubgraphIsomorphismCompatibilityCheck
public boolean exactOrSubgraphIsomorphismCompatibilityCheck(int vertexIndex1, int vertexIndex2) For exact isomorphism, two vertices are compatible if they have the same degree.- Specified by:
exactOrSubgraphIsomorphismCompatibilityCheckin classAbstractUllmanState- Parameters:
vertexIndex1- the index of the vertex in the first graph (in the list of vertices ordered by degree)vertexIndex2- the index of the vertex in the second graph (in the list of vertices ordered by degree)- Returns:
- true if the vertices are compatible, false otherwise
-
isGoal
public boolean isGoal()For exact isomorphism, a mapping is complete when all vertices from both graphs are mapped.- Specified by:
isGoalin interfaceState- Specified by:
isGoalin classAbstractUllmanState
-
isDead
public boolean isDead()A partial mapping is "dead" if there is a vertex from the first graph that has no compatible vertex in the second graph.- Specified by:
isDeadin interfaceState- Specified by:
isDeadin classAbstractUllmanState
-