N - Node parameter typeE - Edge parameter typeinterface NetworkConnections<N,E>
Network.| Modifier and Type | Method and Description |
|---|---|
void |
addInEdge(E edge,
N node,
boolean isSelfLoop)
Add
edge to the set of incoming edges. |
void |
addOutEdge(E edge,
N node)
Add
edge to the set of outgoing edges. |
java.util.Set<N> |
adjacentNodes() |
java.util.Set<E> |
edgesConnecting(java.lang.Object node)
Returns the set of edges connecting the origin node to
node. |
java.util.Set<E> |
incidentEdges() |
java.util.Set<E> |
inEdges() |
N |
oppositeNode(java.lang.Object edge)
Returns the node that is opposite the origin node along
edge. |
java.util.Set<E> |
outEdges() |
java.util.Set<N> |
predecessors() |
N |
removeInEdge(java.lang.Object edge,
boolean isSelfLoop)
Remove
edge from the set of incoming edges. |
N |
removeOutEdge(java.lang.Object edge)
Remove
edge from the set of outgoing edges. |
java.util.Set<N> |
successors() |
java.util.Set<N> adjacentNodes()
java.util.Set<N> predecessors()
java.util.Set<N> successors()
java.util.Set<E> incidentEdges()
java.util.Set<E> inEdges()
java.util.Set<E> outEdges()
java.util.Set<E> edgesConnecting(java.lang.Object node)
node. For networks without
parallel edges, this set cannot be of size greater than one.N oppositeNode(java.lang.Object edge)
edge.
In the directed case, edge is assumed to be an outgoing edge.
N removeInEdge(java.lang.Object edge, boolean isSelfLoop)
edge from the set of incoming edges. Returns the former predecessor node.
In the undirected case, returns null if isSelfLoop is true.
N removeOutEdge(java.lang.Object edge)
edge from the set of outgoing edges. Returns the former successor node.void addInEdge(E edge, N node, boolean isSelfLoop)
edge to the set of incoming edges. Implicitly adds node as a predecessor.