Class VF2ExactState

All Implemented Interfaces:
State

public class VF2ExactState extends AbstractVF2State
Class for the VF2 algorithm for exact graph isomorphism.
Author:
Ignat Gabriel-Andrei
  • Constructor Details

  • Method Details

    • exactOrSubgraphIsomorphismCompatibilityCheck

      public boolean exactOrSubgraphIsomorphismCompatibilityCheck(int term_in1, int term_out1, int term_in2, int term_out2, int new_1, int new_2)
      For exact isomorphism, a new pair of candidate vertices are feasible if the number of 'in'/'out'/'new' vertices in the subgraph G1(s) is the same as in the subgraph G2(s)
      Specified by:
      exactOrSubgraphIsomorphismCompatibilityCheck in class AbstractVF2State
      Parameters:
      term_in1 - number of unmapped vertices that are going in the subgraph G1(s)
      term_out1 - number of unmapped vertices that are going out the subgraph G1(s)
      term_in2 - number of unmapped vertices that are going in the subgraph G2(s)
      term_out2 - number of unmapped vertices that are going out the subgraph G2(s)
      new_1 - number of unmapped vertices that were not yet marked as 'in' or 'out'
      new_2 - number of unmapped vertices that were not yet marked as 'in' or 'out'
      Returns:
      true if the pair is feasible, false otherwise
    • isGoal

      public boolean isGoal()
      For exact isomorphism, a state is complete if all vertices from the both graphs are mapped.
      Specified by:
      isGoal in interface State
      Specified by:
      isGoal in class AbstractVF2State
    • isDead

      public boolean isDead()
      For exact isomorphism, a state is 'dead' if the number of 'in'/'out'/'both' vertices in the subgraph G1(s) is different from that in the subgraph G2(s)
      Specified by:
      isDead in interface State
      Specified by:
      isDead in class AbstractVF2State