Class ForestIsomorphism

java.lang.Object
org.graph4j.isomorphism.ForestIsomorphism
All Implemented Interfaces:
IsomorphismAlgorithm

public class ForestIsomorphism extends Object implements IsomorphismAlgorithm
Algorithm for testing isomorphism of undirected forests. The implementation runs in linear time (in the number of vertices of the input forest).
Author:
Cristian Frasinaru
See Also:
  • Constructor Details

    • ForestIsomorphism

      public ForestIsomorphism(Graph forest1, Graph forest2)
      Constructor for the forest isomorphism algorithm. It does not verify if the input graphs are actually forests.
      Parameters:
      forest1 - the first forest.
      forest2 - the second forest.
      Throws:
      NullPointerException - if either forest1 or forest2 is null.
      IllegalArgumentException - if either forest1 or forest2 is not undirected.
  • Method Details