Package org.jgrapht.graph.specifics
Class DirectedEdgeContainer<V,E>
- java.lang.Object
-
- org.jgrapht.graph.specifics.DirectedEdgeContainer<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
java.io.Serializable
public class DirectedEdgeContainer<V,E> extends java.lang.Object implements java.io.Serializable
A container for vertex edges.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).
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Set<E>
incoming
(package private) java.util.Set<E>
outgoing
private static long
serialVersionUID
private java.util.Set<E>
unmodifiableIncoming
private java.util.Set<E>
unmodifiableOutgoing
-
Constructor Summary
Constructors Constructor Description DirectedEdgeContainer(EdgeSetFactory<V,E> edgeSetFactory, V vertex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIncomingEdge(E e)
Add an incoming edge.void
addOutgoingEdge(E e)
Add an outgoing edge.java.util.Set<E>
getUnmodifiableIncomingEdges()
A lazy build of unmodifiable incoming edge set.java.util.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.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
incoming
java.util.Set<E> incoming
-
outgoing
java.util.Set<E> outgoing
-
unmodifiableIncoming
private transient java.util.Set<E> unmodifiableIncoming
-
unmodifiableOutgoing
private transient java.util.Set<E> unmodifiableOutgoing
-
-
Constructor Detail
-
DirectedEdgeContainer
DirectedEdgeContainer(EdgeSetFactory<V,E> edgeSetFactory, V vertex)
-
-
Method Detail
-
getUnmodifiableIncomingEdges
public java.util.Set<E> getUnmodifiableIncomingEdges()
A lazy build of unmodifiable incoming edge set.- Returns:
- an unmodifiable version of the incoming edge set
-
getUnmodifiableOutgoingEdges
public java.util.Set<E> getUnmodifiableOutgoingEdges()
A lazy build of unmodifiable outgoing edge set.- Returns:
- an unmodifiable version of the outgoing edge set
-
addIncomingEdge
public void addIncomingEdge(E e)
Add an incoming edge.- Parameters:
e
- the edge to add
-
addOutgoingEdge
public void addOutgoingEdge(E e)
Add an outgoing edge.- Parameters:
e
- the edge to add
-
removeIncomingEdge
public void removeIncomingEdge(E e)
Remove an incoming edge.- Parameters:
e
- the edge to remove
-
removeOutgoingEdge
public void removeOutgoingEdge(E e)
Remove an outgoing edge.- Parameters:
e
- the edge to remove
-
-