V
- the graph vertex typeE
- the graph edge typepublic class FastLookupDirectedSpecifics<V,E> extends DirectedSpecifics<V,E>
DirectedSpecifics
instead.Modifier and Type | Field and Description |
---|---|
protected Map<Pair<V,V>,Set<E>> |
touchingVerticesToEdgeMap
Maps a pair of vertices <u,v> to a set of edges {(u,v)}.
|
edgeSetFactory, graph, vertexMap
Constructor and Description |
---|
FastLookupDirectedSpecifics(Graph<V,E> graph)
Deprecated.
Since default strategies should be decided at a higher level.
|
FastLookupDirectedSpecifics(Graph<V,E> graph,
Map<V,DirectedEdgeContainer<V,E>> vertexMap)
Deprecated.
Since default strategies should be decided at a higher level.
|
FastLookupDirectedSpecifics(Graph<V,E> graph,
Map<V,DirectedEdgeContainer<V,E>> vertexMap,
EdgeSetFactory<V,E> edgeSetFactory)
Deprecated.
Since default strategies should be decided at a higher level.
|
FastLookupDirectedSpecifics(Graph<V,E> graph,
Map<V,DirectedEdgeContainer<V,E>> vertexMap,
Map<Pair<V,V>,Set<E>> touchingVerticesToEdgeMap,
EdgeSetFactory<V,E> edgeSetFactory)
Construct a new fast lookup directed specifics.
|
Modifier and Type | Method and Description |
---|---|
void |
addEdgeToTouchingVertices(E e)
Adds the specified edge to the edge containers of its source and target vertices.
|
Set<E> |
getAllEdges(V sourceVertex,
V targetVertex)
Returns a set of all edges connecting source vertex to target vertex if such vertices exist
in this graph.
|
E |
getEdge(V sourceVertex,
V targetVertex)
Returns an edge connecting source vertex to target vertex if such vertices and such edge
exist in this graph.
|
void |
removeEdgeFromTouchingVertices(E e)
Removes the specified edge from the edge containers of its source and target vertices.
|
addVertex, degreeOf, edgesOf, getEdgeContainer, getVertexSet, incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf
@Deprecated public FastLookupDirectedSpecifics(Graph<V,E> graph)
graph
- the graph for which these specifics are for@Deprecated public FastLookupDirectedSpecifics(Graph<V,E> graph, Map<V,DirectedEdgeContainer<V,E>> vertexMap)
graph
- the graph for which these specifics are forvertexMap
- map for the storage of vertex edge sets@Deprecated public FastLookupDirectedSpecifics(Graph<V,E> graph, Map<V,DirectedEdgeContainer<V,E>> vertexMap, EdgeSetFactory<V,E> edgeSetFactory)
graph
- the graph for which these specifics are forvertexMap
- map for the storage of vertex edge sets. Needs to have a predictable
iteration order.edgeSetFactory
- factory for the creation of vertex edge setspublic FastLookupDirectedSpecifics(Graph<V,E> graph, Map<V,DirectedEdgeContainer<V,E>> vertexMap, Map<Pair<V,V>,Set<E>> touchingVerticesToEdgeMap, EdgeSetFactory<V,E> edgeSetFactory)
graph
- the graph for which these specifics are forvertexMap
- map for the storage of vertex edge sets. Needs to have a predictable
iteration order.touchingVerticesToEdgeMap
- Additional map for caching. No need for a predictable
iteration order.edgeSetFactory
- factory for the creation of vertex edge setspublic Set<E> getAllEdges(V sourceVertex, V targetVertex)
null
, returns
null
. If both vertices exist but no edges found, returns an empty set.getAllEdges
in interface Specifics<V,E>
getAllEdges
in class DirectedSpecifics<V,E>
sourceVertex
- source vertex of the edge.targetVertex
- target vertex of the edge.public E getEdge(V sourceVertex, V targetVertex)
null
. If any of the specified vertices is null
returns null
In undirected graphs, the returned edge may have its source and target vertices in the opposite order.
public void addEdgeToTouchingVertices(E e)
addEdgeToTouchingVertices
in interface Specifics<V,E>
addEdgeToTouchingVertices
in class DirectedSpecifics<V,E>
e
- the edgepublic void removeEdgeFromTouchingVertices(E e)
removeEdgeFromTouchingVertices
in interface Specifics<V,E>
removeEdgeFromTouchingVertices
in class DirectedSpecifics<V,E>
e
- the edgeCopyright © 2018. All rights reserved.