Package | Description |
---|---|
com.google.common.graph |
An API for representing graph (node and edge) data.
|
Modifier and Type | Interface and Description |
---|---|
interface |
MutableGraph<N>
A subinterface of
Graph which adds mutation methods. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractGraph<N>
This class provides a skeletal implementation of
Graph . |
(package private) class |
ForwardingGraph<N>
|
private static class |
Graphs.TransposedGraph<N> |
class |
ImmutableGraph<N>
A
Graph whose elements and structural relationships will never change. |
(package private) class |
StandardMutableGraph<N>
Standard implementation of
MutableGraph that supports both directed and undirected
graphs. |
Modifier and Type | Field and Description |
---|---|
private Graph<N> |
Graphs.TransposedGraph.graph |
Modifier and Type | Method and Description |
---|---|
Graph<N> |
AbstractNetwork.asGraph() |
Graph<N> |
AbstractValueGraph.asGraph() |
Graph<N> |
Network.asGraph()
Returns a live view of this network as a
Graph . |
Graph<N> |
ValueGraph.asGraph()
Returns a live view of this graph as a
Graph . |
(package private) Graph<N> |
Graphs.TransposedGraph.delegate() |
static <N> Graph<N> |
Graphs.transitiveClosure(Graph<N> graph)
Returns the transitive closure of
graph . |
static <N> Graph<N> |
Graphs.transpose(Graph<N> graph)
Returns a view of
graph with the direction (if any) of every edge reversed. |
Modifier and Type | Method and Description |
---|---|
private static boolean |
Graphs.canTraverseWithoutReusingEdge(Graph<?> graph,
java.lang.Object nextNode,
java.lang.Object previousNode)
Determines whether an edge has already been used during traversal.
|
private static <N> GraphConnections<N,GraphConstants.Presence> |
ImmutableGraph.connectionsOf(Graph<N> graph,
N node) |
static <N> MutableGraph<N> |
Graphs.copyOf(Graph<N> graph)
Creates a mutable copy of
graph with the same nodes and edges. |
static <N> ImmutableGraph<N> |
ImmutableGraph.copyOf(Graph<N> graph)
Returns an immutable copy of
graph . |
static <N> GraphBuilder<N> |
GraphBuilder.from(Graph<N> graph)
Returns a
GraphBuilder initialized with all properties queryable from graph . |
private static <N> ImmutableMap<N,GraphConnections<N,GraphConstants.Presence>> |
ImmutableGraph.getNodeConnections(Graph<N> graph) |
static <N> boolean |
Graphs.hasCycle(Graph<N> graph)
Returns true if
graph has at least one cycle. |
static <N> MutableGraph<N> |
Graphs.inducedSubgraph(Graph<N> graph,
java.lang.Iterable<? extends N> nodes)
Returns the subgraph of
graph induced by nodes . |
(package private) static <N> EndpointPair<N> |
EndpointPair.of(Graph<?> graph,
N nodeU,
N nodeV)
Returns an
EndpointPair representing the endpoints of an edge in graph . |
static <N> java.util.Set<N> |
Graphs.reachableNodes(Graph<N> graph,
N node)
Returns the set of nodes that are reachable from
node . |
private static <N> boolean |
Graphs.subgraphHasCycle(Graph<N> graph,
java.util.Map<java.lang.Object,Graphs.NodeVisitState> visitedNodes,
N node,
N previousNode)
Performs a traversal of the nodes reachable from
node . |
static <N> Graph<N> |
Graphs.transitiveClosure(Graph<N> graph)
Returns the transitive closure of
graph . |
static <N> Graph<N> |
Graphs.transpose(Graph<N> graph)
Returns a view of
graph with the direction (if any) of every edge reversed. |
Constructor and Description |
---|
TransposedGraph(Graph<N> graph) |