Package com.google.common.graph
Interface NetworkConnections<N,E>
- Type Parameters:
N
- Node parameter typeE
- Edge parameter type
- All Known Implementing Classes:
AbstractDirectedNetworkConnections
,AbstractUndirectedNetworkConnections
,DirectedMultiNetworkConnections
,DirectedNetworkConnections
,UndirectedMultiNetworkConnections
,UndirectedNetworkConnections
interface NetworkConnections<N,E>
An interface for representing and manipulating an origin node's adjacent nodes and incident edges
in a
Network
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Addedge
to the set of incoming edges.void
addOutEdge
(E edge, N node) Addedge
to the set of outgoing edges.adjacentNode
(E edge) Returns the node that is adjacent to the origin node alongedge
.edgesConnecting
(N node) Returns the set of edges connecting the origin node tonode
.inEdges()
outEdges()
removeInEdge
(E edge, boolean isSelfLoop) Removeedge
from the set of incoming edges.removeOutEdge
(E edge) Removeedge
from the set of outgoing edges.
-
Method Details
-
adjacentNodes
-
predecessors
-
successors
-
incidentEdges
-
inEdges
-
outEdges
-
edgesConnecting
Returns the set of edges connecting the origin node tonode
. For networks without parallel edges, this set cannot be of size greater than one. -
adjacentNode
Returns the node that is adjacent to the origin node alongedge
.In the directed case,
edge
is assumed to be an outgoing edge. -
removeInEdge
Removeedge
from the set of incoming edges. Returns the former predecessor node.In the undirected case, returns
null
ifisSelfLoop
is true. -
removeOutEdge
Removeedge
from the set of outgoing edges. Returns the former successor node. -
addInEdge
Addedge
to the set of incoming edges. Implicitly addsnode
as a predecessor. -
addOutEdge
Addedge
to the set of outgoing edges. Implicitly addsnode
as a successor.
-