V - the graph vertex typeE - the graph edge typepublic class FastLookupUndirectedSpecifics<V,E> extends UndirectedSpecifics<V,E> implements Serializable
DirectedSpecifics instead.| Modifier and Type | Field and Description |
|---|---|
protected Map<VertexPair<V>,ArrayUnenforcedSet<E>> |
touchingVerticesToEdgeMap |
abstractBaseGraph, edgeSetFactory, vertexMapUndirected| Constructor and Description |
|---|
FastLookupUndirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph)
Construct a new fast lookup undirected specifics.
|
FastLookupUndirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph,
Map<V,UndirectedEdgeContainer<V,E>> vertexMap)
Construct a new fast lookup undirected 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, outgoingEdgesOfprotected Map<VertexPair<V>,ArrayUnenforcedSet<E>> touchingVerticesToEdgeMap
public FastLookupUndirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph)
abstractBaseGraph - the graph for which these specifics are forpublic FastLookupUndirectedSpecifics(AbstractBaseGraph<V,E> abstractBaseGraph, Map<V,UndirectedEdgeContainer<V,E>> vertexMap)
abstractBaseGraph - the graph for which these specifics are forvertexMap - a container to use for the edgespublic Set<E> getAllEdges(V sourceVertex, V targetVertex)
null, returns
null. If both vertices exist but no edges found, returns an empty set.getAllEdges in class UndirectedSpecifics<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.
getEdge in class UndirectedSpecifics<V,E>sourceVertex - source vertex of the edge.targetVertex - target vertex of the edge.public void addEdgeToTouchingVertices(E e)
addEdgeToTouchingVertices in class UndirectedSpecifics<V,E>e - the edgepublic void removeEdgeFromTouchingVertices(E e)
removeEdgeFromTouchingVertices in class UndirectedSpecifics<V,E>e - the edgeCopyright © 2016. All rights reserved.