Package org.graph4j.isomorphism
Interface IsomorphismAlgorithm
- All Known Implementing Classes:
ForestIsomorphism,RootedForestIsomorphism,RootedTreeIsomorphism,TreeIsomorphism
public interface IsomorphismAlgorithm
Interface for graph isomorphism algorithms.
- Author:
- Ignat Gabriel-Andrei
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the graphs are isomorphic.default booleancheckTrivialConditions(Graph graph1, Graph graph2) Performs some trivial checks in order to determine if two graphs may be isomorphic.Finds the isomorphic mapping between the first and the second graph.
-
Method Details
-
findIsomorphism
Isomorphism findIsomorphism()Finds the isomorphic mapping between the first and the second graph.- Returns:
- the isomorphism or
nullif the graphs are not isomorphic.
-
areIsomorphic
boolean areIsomorphic()Checks if the graphs are isomorphic.- Returns:
trueif the graphs are isomorphic,falseotherwise.
-
checkTrivialConditions
Performs some trivial checks in order to determine if two graphs may be isomorphic. If the method returnsfalse, the graphs are not isomorphic.- Parameters:
graph1- first graph.graph2- the second graph;- Returns:
trueif the graphs have similar trivial properties.
-