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 . |
class |
ImmutableGraph<N>
A
Graph whose elements and structural relationships will never change. |
Modifier and Type | Method and Description |
---|---|
Graph<N> |
Network.asGraph()
Returns a live view of this network as a
Graph . |
Graph<N> |
AbstractNetwork.asGraph() |
Graph<N> |
ValueGraph.asGraph()
Returns a live view of this graph as a
Graph . |
Graph<N> |
AbstractValueGraph.asGraph() |
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 |
---|---|
static <N> ImmutableGraph<N> |
ImmutableGraph.copyOf(Graph<N> graph)
Returns an immutable copy of
graph . |
static <N> MutableGraph<N> |
Graphs.copyOf(Graph<N> graph)
Creates a mutable copy of
graph with the same nodes and edges. |
static boolean |
Graphs.equivalent(Graph<?> graphA,
Graph<?> graphB)
Deprecated.
Use
equals(Object) instead. This method will be removed in late 2017. |
static boolean |
Graphs.equivalent(Graph<?> graphA,
Graph<?> graphB)
Deprecated.
Use
equals(Object) instead. This method will be removed in late 2017. |
static <N> GraphBuilder<N> |
GraphBuilder.from(Graph<N> graph)
Returns a
GraphBuilder initialized with all properties queryable from 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,
Iterable<? extends N> nodes)
Returns the subgraph of
graph induced by nodes . |
static <N> Set<N> |
Graphs.reachableNodes(Graph<N> graph,
N node)
Returns the set of nodes that are 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. |
Copyright © 2010–2017. All rights reserved.