public class DefaultGraphMapping<V,E> extends Object implements GraphMapping<V,E>
getVertex/EdgeCorrespondence
is based on the performance of the
concrete Map class which is passed in the constructor. For example, using
hashmaps will provide O(1) performence.Constructor and Description |
---|
DefaultGraphMapping(Map<V,V> g1ToG2,
Map<V,V> g2ToG1,
Graph<V,E> g1,
Graph<V,E> g2)
The maps themselves are used.
|
Modifier and Type | Method and Description |
---|---|
E |
getEdgeCorrespondence(E currEdge,
boolean forward)
Gets the mapped value where the key is
edge |
V |
getVertexCorrespondence(V keyVertex,
boolean forward)
Gets the mapped value where the key is
vertex |
public DefaultGraphMapping(Map<V,V> g1ToG2, Map<V,V> g2ToG1, Graph<V,E> g1, Graph<V,E> g2)
g1ToG2
- g2ToG1
- g1
- g2
- public E getEdgeCorrespondence(E currEdge, boolean forward)
GraphMapping
edge
getEdgeCorrespondence
in interface GraphMapping<V,E>
currEdge
- edge in one of the graphsforward
- if true, uses mapping from graph1 to graph2; if false, use
mapping from graph2 to graph1public V getVertexCorrespondence(V keyVertex, boolean forward)
GraphMapping
vertex
getVertexCorrespondence
in interface GraphMapping<V,E>
keyVertex
- vertex in one of the graphsforward
- if true, uses mapping from graph1 to graph2; if false, use
mapping from graph2 to graph1Copyright © 2016. All rights reserved.