|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgrapht.experimental.isomorphism.AdaptiveIsomorphismInspectorFactory
public class AdaptiveIsomorphismInspectorFactory
This class serves as a factory for GraphIsomorphismInspector concrete implementations. It can be used in two ways:
Note that the concrete implementations are package-private and should not be created directly. If you are the maintainer of the package, you can add new implementation classes, and add them to the "check-list". The current algorithms do not support graphs with multiple edges (Multigraph / Pseudograph)
GraphIsomorphismInspector
Field Summary | |
---|---|
static int |
GRAPH_TYPE_ARBITRARY
|
static int |
GRAPH_TYPE_MULTIGRAPH
|
static int |
GRAPH_TYPE_PLANAR
|
static int |
GRAPH_TYPE_TREE
|
Constructor Summary | |
---|---|
AdaptiveIsomorphismInspectorFactory()
|
Method Summary | ||
---|---|---|
protected static void |
assertUnsupportedGraphTypes(Graph g)
Checks if one of the graphs is from unsupported graph type and throws IllegalArgumentException if it is. |
|
protected static int |
checkGraphsType(Graph graph1,
Graph graph2)
|
|
protected static
|
createAppropriateConcreteInspector(int graphType,
Graph<V,E> graph1,
Graph<V,E> graph2,
EquivalenceComparator<V,Graph<V,E>> vertexChecker,
EquivalenceComparator<E,Graph<V,E>> edgeChecker)
Checks the graph type, and accordingly decides which type of concrete inspector class to create. |
|
static
|
createIsomorphismInspector(Graph<V,E> graph1,
Graph<V,E> graph2)
Creates a new inspector, letting this class determine what is the most efficient algorithm and using default equivalence comparators. |
|
static
|
createIsomorphismInspector(Graph<V,E> graph1,
Graph<V,E> graph2,
EquivalenceComparator<V,Graph<V,E>> vertexChecker,
EquivalenceComparator<E,Graph<V,E>> edgeChecker)
Creates a new inspector, letting this class determine what is the most efficient algorithm. |
|
static
|
createIsomorphismInspectorByType(int type,
Graph<V,E> graph1,
Graph<V,E> graph2)
Creates a new inspector for a particular graph type (planar / tree / other) using default equivalence comparators. |
|
static
|
createIsomorphismInspectorByType(int type,
Graph<V,E> graph1,
Graph<V,E> graph2,
EquivalenceComparator<V,Graph<V,E>> vertexChecker,
EquivalenceComparator<E,Graph<V,E>> edgeChecker)
Creates a new inspector for a particular graph type (planar / tree / other). |
|
protected static
|
createTopologicalExhaustiveInspector(Graph<V,E> graph1,
Graph<V,E> graph2,
EquivalenceComparator<V,Graph<V,E>> vertexChecker,
EquivalenceComparator<E,Graph<V,E>> edgeChecker)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GRAPH_TYPE_ARBITRARY
public static final int GRAPH_TYPE_PLANAR
public static final int GRAPH_TYPE_TREE
public static final int GRAPH_TYPE_MULTIGRAPH
Constructor Detail |
---|
public AdaptiveIsomorphismInspectorFactory()
Method Detail |
---|
public static <V,E> GraphIsomorphismInspector createIsomorphismInspector(Graph<V,E> graph1, Graph<V,E> graph2, EquivalenceComparator<V,Graph<V,E>> vertexChecker, EquivalenceComparator<E,Graph<V,E>> edgeChecker)
graph1
- graph2
- vertexChecker
- may be nulledgeChecker
- may be nullpublic static <V,E> GraphIsomorphismInspector createIsomorphismInspector(Graph<V,E> graph1, Graph<V,E> graph2)
same as calling createIsomorphismInspector(graph1,graph2,null,null);
graph1
- graph2
- public static <V,E> GraphIsomorphismInspector createIsomorphismInspectorByType(int type, Graph<V,E> graph1, Graph<V,E> graph2, EquivalenceComparator<V,Graph<V,E>> vertexChecker, EquivalenceComparator<E,Graph<V,E>> edgeChecker)
type
- - AdaptiveIsomorphismInspectorFactory.GRAPH_TYPE_XXXgraph1
- graph2
- vertexChecker
- - can be nulledgeChecker
- - can be nullpublic static <V,E> GraphIsomorphismInspector createIsomorphismInspectorByType(int type, Graph<V,E> graph1, Graph<V,E> graph2)
same as calling createAppropriateConcreteInspector(graph1,graph2,null,null);
type
- - AdaptiveIsomorphismInspectorFactory.GRAPH_TYPE_XXXgraph1
- graph2
- protected static <V,E> GraphIsomorphismInspector createAppropriateConcreteInspector(int graphType, Graph<V,E> graph1, Graph<V,E> graph2, EquivalenceComparator<V,Graph<V,E>> vertexChecker, EquivalenceComparator<E,Graph<V,E>> edgeChecker)
graph1
- graph2
- vertexChecker
- edgeChecker
- protected static void assertUnsupportedGraphTypes(Graph g) throws IllegalArgumentException
g
-
IllegalArgumentException
protected static int checkGraphsType(Graph graph1, Graph graph2)
protected static <V,E> GraphIsomorphismInspector createTopologicalExhaustiveInspector(Graph<V,E> graph1, Graph<V,E> graph2, EquivalenceComparator<V,Graph<V,E>> vertexChecker, EquivalenceComparator<E,Graph<V,E>> edgeChecker)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |