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>,ArrayUnenforcedSet<E>> |
touchingVerticesToEdgeMap |
abstractBaseGraph, edgeSetFactory, vertexMapDirected
Constructor and Description |
---|
FastLookupDirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph)
Construct a new fast lookup directed specifics.
|
FastLookupDirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph,
Map<V,DirectedEdgeContainer<V,E>> vertexMap)
Construct a new fast lookup directed specifics.
|
FastLookupDirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph,
Map<V,DirectedEdgeContainer<V,E>> vertexMap,
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
public FastLookupDirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph)
abstractBaseGraph
- the graph for which these specifics are forpublic FastLookupDirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph, Map<V,DirectedEdgeContainer<V,E>> vertexMap)
abstractBaseGraph
- the graph for which these specifics are forvertexMap
- map for the storage of vertex edge setspublic FastLookupDirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph, Map<V,DirectedEdgeContainer<V,E>> vertexMap, EdgeSetFactory<V,E> edgeSetFactory)
abstractBaseGraph
- the graph for which these specifics are forvertexMap
- map for the storage of vertex edge setsedgeSetFactory
- 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 © 2017. All rights reserved.