public class IsomorphismRelation<V,E> extends java.lang.Object implements GraphMapping<V,E>
Usage:
getVertexCorrespondence()
or
getEdgeCorrespondence()
to get the mapped object in the other graph.
It consists of two vertexes array , the i-th vertex in the 1st array is the isomorphic eqv. of the i-th in 2nd array. Note that the getters are unsafe (they return the array and not a copy of it).
Constructor and Description |
---|
IsomorphismRelation(java.util.List<V> aGraph1vertexArray,
java.util.List<V> aGraph2vertexArray,
Graph<V,E> g1,
Graph<V,E> g2) |
Modifier and Type | Method and Description |
---|---|
E |
getEdgeCorrespondence(E edge,
boolean forward)
Gets the mapped value where the key is
edge |
V |
getVertexCorrespondence(V vertex,
boolean forward)
Gets the mapped value where the key is
vertex |
java.lang.String |
toString() |
public java.lang.String toString()
toString
in class java.lang.Object
public V getVertexCorrespondence(V vertex, boolean forward)
GraphMapping
vertex
getVertexCorrespondence
in interface GraphMapping<V,E>
vertex
- 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 edge, boolean forward)
GraphMapping
edge
getEdgeCorrespondence
in interface GraphMapping<V,E>
edge
- edge in one of the graphsforward
- if true, uses mapping from graph1 to graph2; if false, use
mapping from graph2 to graph1