Package | Description |
---|---|
com.google.common.graph |
An API for representing graph (node and edge) data.
|
Modifier and Type | Method and Description |
---|---|
EndpointPair<N> |
Network.incidentNodes(E edge)
Returns the nodes which are the endpoints of
edge in this network. |
static <N> EndpointPair<N> |
EndpointPair.ordered(N source,
N target)
Returns an
EndpointPair representing the endpoints of a directed edge. |
static <N> EndpointPair<N> |
EndpointPair.unordered(N nodeU,
N nodeV)
Returns an
EndpointPair representing the endpoints of an undirected edge. |
Modifier and Type | Method and Description |
---|---|
Set<EndpointPair<N>> |
ValueGraph.edges()
Returns all edges in this graph.
|
Set<EndpointPair<N>> |
Graph.edges()
Returns all edges in this graph.
|
Set<EndpointPair<N>> |
ValueGraph.incidentEdges(N node)
Returns the edges in this graph whose endpoints include
node . |
Set<EndpointPair<N>> |
Graph.incidentEdges(N node)
Returns the edges in this graph whose endpoints include
node . |
Modifier and Type | Method and Description |
---|---|
boolean |
MutableNetwork.addEdge(EndpointPair<N> endpoints,
E edge)
Adds
edge connecting endpoints . |
ImmutableNetwork.Builder<N,E> |
ImmutableNetwork.Builder.addEdge(EndpointPair<N> endpoints,
E edge)
Adds
edge connecting endpoints . |
E |
Network.edgeConnectingOrNull(EndpointPair<N> endpoints)
Returns the single edge that directly connects
endpoints (in the order, if any,
specified by endpoints ), if one is present, or null if no such edge exists. |
E |
AbstractNetwork.edgeConnectingOrNull(EndpointPair<N> endpoints) |
Set<E> |
Network.edgesConnecting(EndpointPair<N> endpoints)
Returns the set of edges that each directly connect
endpoints (in the order, if any,
specified by endpoints ). |
Set<E> |
AbstractNetwork.edgesConnecting(EndpointPair<N> endpoints) |
V |
ValueGraph.edgeValueOrDefault(EndpointPair<N> endpoints,
V defaultValue)
Returns the value of the edge that connects
endpoints (in the order, if any, specified
by endpoints ), if one is present; otherwise, returns defaultValue . |
boolean |
Network.hasEdgeConnecting(EndpointPair<N> endpoints)
Returns true if there is an edge that directly connects
endpoints (in the order, if
any, specified by endpoints ). |
boolean |
ValueGraph.hasEdgeConnecting(EndpointPair<N> endpoints)
Returns true if there is an edge that directly connects
endpoints (in the order, if
any, specified by endpoints ). |
boolean |
Graph.hasEdgeConnecting(EndpointPair<N> endpoints)
Returns true if there is an edge that directly connects
endpoints (in the order, if
any, specified by endpoints ). |
boolean |
AbstractNetwork.hasEdgeConnecting(EndpointPair<N> endpoints) |
protected boolean |
AbstractNetwork.isOrderingCompatible(EndpointPair<?> endpoints) |
boolean |
MutableGraph.putEdge(EndpointPair<N> endpoints)
Adds an edge connecting
endpoints (in the order, if any, specified by endpoints ) if one is not already present. |
ImmutableGraph.Builder<N> |
ImmutableGraph.Builder.putEdge(EndpointPair<N> endpoints)
Adds an edge connecting
endpoints (in the order, if any, specified by endpoints ) if one is not already present. |
V |
MutableValueGraph.putEdgeValue(EndpointPair<N> endpoints,
V value)
Adds an edge connecting
endpoints if one is not already present, and sets a value for
that edge to value (overwriting the existing value, if any). |
ImmutableValueGraph.Builder<N,V> |
ImmutableValueGraph.Builder.putEdgeValue(EndpointPair<N> endpoints,
V value)
Adds an edge connecting
endpoints if one is not already present, and sets a value for
that edge to value (overwriting the existing value, if any). |
V |
MutableValueGraph.removeEdge(EndpointPair<N> endpoints)
Removes the edge connecting
endpoints , if it is present. |
boolean |
MutableGraph.removeEdge(EndpointPair<N> endpoints)
Removes the edge connecting
endpoints , if it is present. |
protected void |
AbstractNetwork.validateEndpoints(EndpointPair<?> endpoints)
Throws an IllegalArgumentException if the ordering of
endpoints is not compatible with
the directionality of this graph. |
Copyright © 2010–2019. All rights reserved.