Uses of Interface
com.google.common.graph.Graph
-
Packages that use Graph Package Description com.google.common.graph An API for representing graph (node and edge) data. -
-
Uses of Graph in com.google.common.graph
Subinterfaces of Graph in com.google.common.graph Modifier and Type Interface Description interface
MutableGraph<N>
A subinterface ofGraph
which adds mutation methods.interface
MutableValueGraph<N,V>
A subinterface ofValueGraph
which adds mutation methods.interface
ValueGraph<N,V>
An interface for graph- structured data, whose edges have associated non-unique values.Classes in com.google.common.graph that implement Graph Modifier and Type Class Description class
AbstractGraph<N>
This class provides a skeletal implementation ofGraph
.class
AbstractValueGraph<N,V>
This class provides a skeletal implementation ofValueGraph
.(package private) class
ConfigurableMutableGraph<N>
Configurable implementation ofMutableGraph
that supports both directed and undirected graphs.(package private) class
ConfigurableMutableValueGraph<N,V>
Configurable implementation ofMutableValueGraph
that supports both directed and undirected graphs.(package private) class
ConfigurableValueGraph<N,V>
Configurable implementation ofValueGraph
that supports the options supplied byAbstractGraphBuilder
.(package private) class
ForwardingGraph<N>
A class to allowGraph
implementations to be backed byValueGraph
s.private static class
Graphs.TransposedGraph<N>
private static class
Graphs.TransposedValueGraph<N,V>
class
ImmutableGraph<N>
AGraph
whose elements and structural relationships will never change.(package private) static class
ImmutableGraph.ValueBackedImpl<N,V>
class
ImmutableValueGraph<N,V>
AValueGraph
whose elements and structural relationships will never change.Fields in com.google.common.graph declared as Graph Modifier and Type Field Description private Graph<N>
EndpointPairIterator. graph
private Graph<N>
Graphs.TransposedGraph. graph
Methods in com.google.common.graph that return Graph Modifier and Type Method Description Graph<N>
AbstractNetwork. asGraph()
Graph<N>
Network. asGraph()
Returns a live view of this network as aGraph
.protected Graph<N>
ConfigurableMutableGraph. delegate()
protected abstract Graph<N>
ForwardingGraph. delegate()
protected Graph<N>
ImmutableGraph.ValueBackedImpl. delegate()
static <N> Graph<N>
Graphs. transitiveClosure(Graph<N> graph)
Returns the transitive closure ofgraph
.static <N> Graph<N>
Graphs. transpose(Graph<N> graph)
Returns a view ofgraph
with the direction (if any) of every edge reversed.Methods in com.google.common.graph with parameters of type Graph Modifier and Type Method 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 ofgraph
with the same nodes and edges.static <N> ImmutableGraph<N>
ImmutableGraph. copyOf(Graph<N> graph)
Returns an immutable copy ofgraph
.static boolean
Graphs. equivalent(Graph<?> graphA, Graph<?> graphB)
Returnstrue
ifgraphA
andgraphB
have the same elements and the same relationships between elements, as exposed via theGraph
interface.static <N> GraphBuilder<N>
GraphBuilder. from(Graph<N> graph)
Returns aGraphBuilder
initialized with all properties queryable fromgraph
.static <N> ValueGraphBuilder<N,java.lang.Object>
ValueGraphBuilder. from(Graph<N> graph)
Returns aValueGraphBuilder
initialized with all properties queryable fromgraph
.private static <N> ImmutableMap<N,GraphConnections<N,GraphConstants.Presence>>
ImmutableGraph. getNodeConnections(Graph<N> graph)
static boolean
Graphs. hasCycle(Graph<?> graph)
Returns true ifgraph
has at least one cycle.static <N> MutableGraph<N>
Graphs. inducedSubgraph(Graph<N> graph, java.lang.Iterable<? extends N> nodes)
Returns the subgraph ofgraph
induced bynodes
.(package private) static <N> EndpointPair<N>
EndpointPair. of(Graph<?> graph, N nodeU, N nodeV)
Returns anEndpointPair
representing the endpoints of an edge ingraph
.(package private) static <N> EndpointPairIterator<N>
EndpointPairIterator. of(Graph<N> graph)
static <N> java.util.Set<N>
Graphs. reachableNodes(Graph<N> graph, java.lang.Object node)
Returns the set of nodes that are reachable fromnode
.private static boolean
Graphs. subgraphHasCycle(Graph<?> graph, java.util.Map<java.lang.Object,Graphs.NodeVisitState> visitedNodes, java.lang.Object node, java.lang.Object previousNode)
Performs a traversal of the nodes reachable fromnode
.static <N> Graph<N>
Graphs. transitiveClosure(Graph<N> graph)
Returns the transitive closure ofgraph
.static <N> Graph<N>
Graphs. transpose(Graph<N> graph)
Returns a view ofgraph
with the direction (if any) of every edge reversed.Constructors in com.google.common.graph with parameters of type Graph Constructor Description Directed(Graph<N> graph)
EndpointPairIterator(Graph<N> graph)
TransposedGraph(Graph<N> graph)
Undirected(Graph<N> graph)
-