public class VF2Algorithm extends Object
Essentially VF2Algorithm implements a backtracking algorithm to search for possible graph morphisms.
Each element of the search space is represented by a VF2State, which represents a partial morphism together
with additional data that allow efficient backtracking.
The search tree is constructed in a way such that no copies of the partial morphism are required.
VF2Algorithm depends on a list of FeasibilityFunctions that determine possible pairs
of pattern-target nodes that are matched onto each other.
The FeasibilityFunctions thus determine the type of Morphism that is actually computed.
A detailed examination of the Algorithm is found in the following paper by
There are two main methodExecution in this class for clients:
{@link VF2Algorithm#builder()} creates a builder to create a customized VF2Algorithm that, for example, includes the desired FeasibilityFunctions.
{@link VF2Algorithm#match(Graph, Graph)} executes the algorithm for the provided pair of Graphs.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEBUG |
| Modifier and Type | Method and Description |
|---|---|
static VF2AlgorithmBuilder |
builder() |
Morphism |
getMorphism() |
boolean |
match(Graph pattern,
Graph target)
Executes the algorithm to find Morphisms from pattern into target.
|
public static final boolean DEBUG
public static VF2AlgorithmBuilder builder()
public boolean match(Graph pattern, Graph target)
pattern - The Graph that should be searched for.target - The Graph we search in.public Morphism getMorphism()
Copyright © 2019. All rights reserved.