V
- the graph vertex typeE
- the graph edge typepublic class DirectedEdgeContainer<V,E> extends Object implements Serializable
In this edge container we use array lists to minimize memory toll. However, for high-degree vertices we replace the entire edge container with a direct access subclass (to be implemented).
Modifier and Type | Method and Description |
---|---|
void |
addIncomingEdge(E e)
Add an incoming edge.
|
void |
addOutgoingEdge(E e)
Add an outgoing edge.
|
Set<E> |
getUnmodifiableIncomingEdges()
A lazy build of unmodifiable incoming edge set.
|
Set<E> |
getUnmodifiableOutgoingEdges()
A lazy build of unmodifiable outgoing edge set.
|
void |
removeIncomingEdge(E e)
Remove an incoming edge.
|
void |
removeOutgoingEdge(E e)
Remove an outgoing edge.
|
public Set<E> getUnmodifiableIncomingEdges()
public Set<E> getUnmodifiableOutgoingEdges()
public void addIncomingEdge(E e)
e
- the edge to addpublic void addOutgoingEdge(E e)
e
- the edge to addpublic void removeIncomingEdge(E e)
e
- the edge to removepublic void removeOutgoingEdge(E e)
e
- the edge to removeCopyright © 2018. All rights reserved.