Network implementations to be backed by a provided delegate. This is not
currently planned to be released as a general-purpose forwarding class.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Set | adjacentEdges(E edge)
Overrides com. Implements com. incident node in
common with edge.
|
| public Set | adjacentNodes(N node)
Implements com. node in
this graph.
|
| public boolean | allowsParallelEdges()
Implements com. |
| public boolean | allowsSelfLoops()
Implements com. |
| public int | degree(N node)
Overrides com. Implements com. node's incident edges, counting
self-loops twice (equivalently, the number of times an edge touches node).
|
| pack-priv abstract Network | |
| public Optional | edgeConnecting(N nodeU, N nodeV)
Overrides com. Implements com. nodeU to nodeV, if one is
present, or Optional.empty() if no such edge exists.
|
| public Optional | edgeConnecting(EndpointPair<N> endpoints)
Overrides com. Implements com. endpoints (in the order, if any,
specified by endpoints), if one is present, or Optional.empty() if no such edge
exists.
|
| public E | edgeConnectingOrNull(N nodeU, N nodeV)
Overrides com. Implements com. nodeU to nodeV, if one is
present, or null if no such edge exists.
|
| public E | edgeConnectingOrNull(EndpointPair<N> endpoints)
Overrides com. Implements com. endpoints (in the order, if any,
specified by endpoints), if one is present, or null if no such edge exists.
|
| public ElementOrder | edgeOrder()
Implements com. edges().
|
| public Set | edges()
Implements com. edgeOrder().
|
| public Set | edgesConnecting(N nodeU, N nodeV)
Overrides com. Implements com. nodeU to nodeV.
|
| public Set | edgesConnecting(EndpointPair<N> endpoints)
Overrides com. Implements com. endpoints (in the
order, if any, specified by endpoints).
|
| public boolean | hasEdgeConnecting(N nodeU, N nodeV)
Overrides com. Implements com. nodeU to nodeV.
|
| public boolean | hasEdgeConnecting(EndpointPair<N> endpoints)
Overrides com. Implements com. endpoints (in the order, if
any, specified by endpoints).
|
| public Set | incidentEdges(N node)
Implements com. incident nodes in this
network include node.
|
| public EndpointPair | incidentNodes(E edge)
Implements com. edge in this network.
|
| public int | inDegree(N node)
Overrides com. Implements com. node's incoming edges in a directed
network.
|
| public Set | inEdges(N node)
Implements com. node.
|
| public boolean | isDirected()
Implements com. |
| public ElementOrder | nodeOrder()
Implements com. nodes().
|
| public Set | nodes()
Implements com. nodeOrder().
|
| public int | outDegree(N node)
Overrides com. Implements com. node's outgoing edges in a directed
network.
|
| public Set | outEdges(N node)
Implements com. node.
|
| public Set | predecessors(N node)
Implements com. node which can be reached
by traversing node's incoming edges against the direction (if any) of the edge.
|
| public Set | successors(N node)
Implements com. node which can be reached
by traversing node's outgoing edges in the direction (if any) of the edge.
|
| ForwardingNetwork | back to summary |
|---|---|
| pack-priv ForwardingNetwork() | |
| adjacentEdges | back to summary |
|---|---|
| public Set Overrides com. Implements com. Doc from com. Returns a live view of the edges which have an If
| |
| adjacentNodes | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of the nodes which have an incident edge in common with This is equal to the union of If
| |
| allowsParallelEdges | back to summary |
|---|---|
| public boolean allowsParallelEdges() Implements com. Doc from com. Returns true if this network allows parallel edges. Attempting to add a parallel edge to a
network that does not allow them will throw an
| |
| allowsSelfLoops | back to summary |
|---|---|
| public boolean allowsSelfLoops() Implements com. Doc from com. Returns true if this network allows self-loops (edges that connect a node to itself).
Attempting to add a self-loop to a network that does not allow them will throw an
| |
| degree | back to summary |
|---|---|
| public int degree(N node) Overrides com. Implements com. Doc from com. Returns the count of For directed networks, this is equal to For undirected networks, this is equal to If the count is greater than
| |
| delegate | back to summary |
|---|---|
| pack-priv abstract Network | |
| edgeConnecting | back to summary |
|---|---|
| public Optional Overrides com. Implements com. Doc from com. Returns the single edge that directly connects In an undirected network, this is equal to
| |
| edgeConnecting | back to summary |
|---|---|
| public Optional Overrides com. Implements com. Doc from com. Returns the single edge that directly connects If this network is directed, the endpoints must be ordered.
| |
| edgeConnectingOrNull | back to summary |
|---|---|
| public E edgeConnectingOrNull(N nodeU, N nodeV) Overrides com. Implements com. Doc from com. Returns the single edge that directly connects In an undirected network, this is equal to
| |
| edgeConnectingOrNull | back to summary |
|---|---|
| public E edgeConnectingOrNull(EndpointPair<N> endpoints) Overrides com. Implements com. Doc from com. Returns the single edge that directly connects If this network is directed, the endpoints must be ordered.
| |
| edgeOrder | back to summary |
|---|---|
| public ElementOrder Implements com. Doc from com. Returns the order of iteration for the elements of
| |
| edges | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns all edges in this network, in the order specified by
| |
| edgesConnecting | back to summary |
|---|---|
| public Set Overrides com. Implements com. Doc from com. Returns a live view of the set of edges that each directly connect In an undirected network, this is equal to The resulting set of edges will be parallel (i.e. have equal If either
| |
| edgesConnecting | back to summary |
|---|---|
| public Set Overrides com. Implements com. Doc from com. Returns a live view of the set of edges that each directly connect The resulting set of edges will be parallel (i.e. have equal If this network is directed, If either element of
| |
| hasEdgeConnecting | back to summary |
|---|---|
| public boolean hasEdgeConnecting(N nodeU, N nodeV) Overrides com. Implements com. Doc from com. Returns true if there is an edge that directly connects In an undirected network, this is equal to
| |
| hasEdgeConnecting | back to summary |
|---|---|
| public boolean hasEdgeConnecting(EndpointPair<N> endpoints) Overrides com. Implements com. Doc from com. Returns true if there is an edge that directly connects Unlike the other
| |
| incidentEdges | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of the edges whose This is equal to the union of If
| |
| incidentNodes | back to summary |
|---|---|
| public EndpointPair Implements com. Doc from com. Returns the nodes which are the endpoints of
| |
| inDegree | back to summary |
|---|---|
| public int inDegree(N node) Overrides com. Implements com. Doc from com. Returns the count of If the count is greater than
| |
| inEdges | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of all edges in this network which can be traversed in the direction (if
any) of the edge to end at In a directed network, an incoming edge's In an undirected network, this is equivalent to If
| |
| isDirected | back to summary |
|---|---|
| public boolean isDirected() Implements com. Doc from com. Returns true if the edges in this network are directed. Directed edges connect a
| |
| nodeOrder | back to summary |
|---|---|
| public ElementOrder Implements com. Doc from com. Returns the order of iteration for the elements of
| |
| nodes | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns all nodes in this network, in the order specified by
| |
| outDegree | back to summary |
|---|---|
| public int outDegree(N node) Overrides com. Implements com. Doc from com. Returns the count of If the count is greater than
| |
| outEdges | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of all edges in this network which can be traversed in the direction (if
any) of the edge starting from In a directed network, an outgoing edge's In an undirected network, this is equivalent to If
| |
| predecessors | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of all nodes in this network adjacent to In an undirected network, this is equivalent to If
| |
| successors | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns a live view of all nodes in this network adjacent to In an undirected network, this is equivalent to This is not the same as "all nodes reachable from If
| |