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 TypeMethodDescriptionvoidAddedgeto the set of incoming edges.voidaddOutEdge(E edge, N node) Addedgeto 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) Removeedgefrom the set of incoming edges.removeOutEdge(E edge) Removeedgefrom 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,
edgeis assumed to be an outgoing edge. -
removeInEdge
Removeedgefrom the set of incoming edges. Returns the former predecessor node.In the undirected case, returns
nullifisSelfLoopis true. -
removeOutEdge
Removeedgefrom the set of outgoing edges. Returns the former successor node. -
addInEdge
Addedgeto the set of incoming edges. Implicitly addsnodeas a predecessor. -
addOutEdge
Addedgeto the set of outgoing edges. Implicitly addsnodeas a successor.
-