V - the type of the verticesE - the type of the edgespublic class IsomorphicGraphMapping<V,E> extends Object implements GraphMapping<V,E>
| Modifier and Type | Field and Description |
|---|---|
static int |
NULL_NODE |
| Constructor and Description |
|---|
IsomorphicGraphMapping(org.jgrapht.alg.isomorphism.GraphOrdering<V,E> g1,
org.jgrapht.alg.isomorphism.GraphOrdering<V,E> g2,
int[] core1,
int[] core2)
Construct a new isomorphic graph mapping
|
IsomorphicGraphMapping(Map<V,V> forwardMapping,
Map<V,V> backwardMapping,
Graph<V,E> graph1,
Graph<V,E> graph2)
Construct a new isomorphic graph mapping.
|
| Modifier and Type | Method and Description |
|---|---|
IsomorphicGraphMapping<V,E> |
compose(IsomorphicGraphMapping<V,E> otherMapping)
Computes the composition of two isomorphisms.
|
boolean |
equals(Object o) |
Map<V,V> |
getBackwardMapping()
Get an unmodifiable version of the backward mapping function.
|
E |
getEdgeCorrespondence(E e,
boolean forward)
Gets the mapped value where the key is
edge |
Map<V,V> |
getForwardMapping()
Get an unmodifiable version of the forward mapping function.
|
Set<V> |
getMappingDomain()
Get the active domain of the isomorphism.
|
Set<V> |
getMappingRange()
Get the range of the isomorphism.
|
V |
getVertexCorrespondence(V v,
boolean forward)
Gets the mapped value where the key is
vertex |
boolean |
hasEdgeCorrespondence(E e)
Checks if a edge e from the first graph has a corresponding edge in the second graph
|
int |
hashCode() |
boolean |
hasVertexCorrespondence(V v)
Checks if a vertex $v$ from the first graph has a corresponding vertex in the second graph
|
static <V,E> IsomorphicGraphMapping<V,E> |
identity(Graph<V,E> graph)
Computes an identity automorphism (i.e.
|
boolean |
isEqualMapping(GraphMapping<V,E> rel)
Checks for equality.
|
boolean |
isValidIsomorphism()
Determines whether this mapping is indeed a valid isomorphic mapping between the first graph
and the second graph.
|
String |
toString() |
public static final int NULL_NODE
public IsomorphicGraphMapping(org.jgrapht.alg.isomorphism.GraphOrdering<V,E> g1, org.jgrapht.alg.isomorphism.GraphOrdering<V,E> g2, int[] core1, int[] core2)
g1 - the first graphg2 - the second graph which is a possible subgraph of g1core1 - the mapping as array (forwards)core2 - the mapping as array (backwards)public IsomorphicGraphMapping(Map<V,V> forwardMapping, Map<V,V> backwardMapping, Graph<V,E> graph1, Graph<V,E> graph2)
forwardMapping - the mapping from graph1 to graph2backwardMapping - the mapping from graph2 to graph1 (inverse of forwardMapping)graph1 - the first graphgraph2 - the second graphpublic V getVertexCorrespondence(V v, boolean forward)
GraphMappingvertexgetVertexCorrespondence in interface GraphMapping<V,E>v - vertex in one of the graphsforward - if true, uses mapping from graph1 to graph2; if false, use mapping from graph2
to graph1public E getEdgeCorrespondence(E e, boolean forward)
GraphMappingedgegetEdgeCorrespondence in interface GraphMapping<V,E>e - edge in one of the graphsforward - if true, uses mapping from graph1 to graph2; if false, use mapping from graph2
to graph1public Map<V,V> getForwardMapping()
public Map<V,V> getBackwardMapping()
public Set<V> getMappingDomain()
public Set<V> getMappingRange()
public boolean hasVertexCorrespondence(V v)
v - the vertexpublic boolean hasEdgeCorrespondence(E e)
e - the edgepublic boolean isValidIsomorphism()
public boolean isEqualMapping(GraphMapping<V,E> rel)
rel - the corresponding mappingpublic IsomorphicGraphMapping<V,E> compose(IsomorphicGraphMapping<V,E> otherMapping)
otherMapping - the other isomorphism (i.e. function $g$)public static <V,E> IsomorphicGraphMapping<V,E> identity(Graph<V,E> graph)
V - the graph vertex typeE - the graph edge typegraph - the input graphCopyright © 2018. All rights reserved.