Class VF2SubState

All Implemented Interfaces:
State

public class VF2SubState extends AbstractVF2State
Class for the VF2 algorithm for subgraph isomorphism.

The first graph is the subgraph and the second graph is the graph where we search the isomorphic subgraph.

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 lower or equal 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 subgraph isomorphism, a state is complete if all vertices from the first graph are mapped.
      Specified by:
      isGoal in interface State
      Specified by:
      isGoal in class AbstractVF2State
    • isDead

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