Package com.google.common.graph
@ParametersAreNonnullByDefault
package com.google.common.graph
An API for representing graph (node and edge) data. It is analogous to the Java Collections
Framework APIs for lists, maps, sets, etc.
This package is a part of the open-source Guava library.
-
ClassDescriptionThis class provides a skeletal implementation of
BaseGraph
.A base implementation ofNetworkConnections
for directed networks.This class provides a skeletal implementation ofGraph
.A base class for builders that construct graphs with user-defined properties.AbstractNetwork<N,E> This class provides a skeletal implementation ofNetwork
.A base implementation ofNetworkConnections
for undirected networks.AbstractValueGraph<N,V> This class provides a skeletal implementation ofValueGraph
.BaseGraph<N>A non-public interface for the methods shared betweenGraph
andValueGraph
.An implementation ofGraphConnections
for directed graphs.A value class representing single connection between the origin node and another node.A wrapper class to indicate a node is both a predecessor and successor while still providing the successor value.An implementation ofNetworkConnections
for directed networks with parallel edges.An implementation ofNetworkConnections
for directed networks.A class to represent the set of edges connecting an (implicit) origin node to a target node.ElementOrder<T>Used to represent the order of elements in a data structure that supports different options for iteration order guarantees.The type of ordering that this object specifies.Marks all "top-level" types as non-null in a way that is recognized by Kotlin.EndpointPair<N>An immutable pair representing the two endpoints of an edge in a graph.A class to facilitate the set returned byGraph.edges()
.If the graph is directed, each ordered [source, target] pair will be visited once if there is an edge connecting them.If the graph is undirected, each unordered [node, otherNode] pair (except self-loops) will be visited twice if there is an edge connecting them.ForwardingNetwork<N,E> A class to allowNetwork
implementations to be backed by a provided delegate.ForwardingValueGraph<N,V> A class to allowValueGraph
implementations to be backed by a provided delegate.Graph<N>An interface for graph-structured data, whose edges are anonymous entities with no identity or information of their own.GraphBuilder<N>A builder for constructing instances ofMutableGraph
orImmutableGraph
with user-defined properties.GraphConnections<N,V> An interface for representing and manipulating an origin node's adjacent nodes and edge values in aGraph
.A utility class to hold various constants used by the Guava Graph library.Singleton edge value forGraph
implementations backed byValueGraph
s.An enum representing the state of a node during DFS.Supertype forGraphs
, containing the old signatures of methods whose signatures we've changed.AGraph
whose elements and structural relationships will never change.A builder for creatingImmutableGraph
instances, especiallystatic final
graphs.ImmutableNetwork<N,E> ANetwork
whose elements and structural relationships will never change.A builder for creatingImmutableNetwork
instances, especiallystatic final
networks.ImmutableValueGraph<N,V> AValueGraph
whose elements and structural relationships will never change.A builder for creatingImmutableValueGraph
instances, especiallystatic final
graphs.Abstract base class for an incident edges set that allows different implementations ofAbstractCollection.iterator()
.A subclass of `ForwardingSet` that throws `IllegalStateException` on invocation of any method (except `hashCode` and `equals`) if the provided `Supplier` returns false.MapIteratorCache<K,V> A map-like data structure that wraps a backing map and caches values while iterating throughMapIteratorCache.unmodifiableKeySet()
.MapRetrievalCache<K,V> AMapIteratorCache
that adds additional caching.A class to represent the set of edges connecting an (implicit) origin node to a target node.MutableGraph<N>A subinterface ofGraph
which adds mutation methods.MutableNetwork<N,E> A subinterface ofNetwork
which adds mutation methods.MutableValueGraph<N,V> A subinterface ofValueGraph
which adds mutation methods.Network<N,E> An interface for graph-structured data, whose edges are unique objects.NetworkBuilder<N,E> A builder for constructing instances ofMutableNetwork
orImmutableNetwork
with user-defined properties.NetworkConnections<N,E> An interface for representing and manipulating an origin node's adjacent nodes and incident edges in aNetwork
.Annotates a "top-level" type-variable usage that takes its nullness from the type argument supplied by the user of the class.A functional interface for graph-structured data.Standard implementation ofMutableGraph
that supports both directed and undirected graphs.Standard implementation ofMutableNetwork
that supports both directed and undirected graphs.Standard implementation ofMutableValueGraph
that supports both directed and undirected graphs.StandardNetwork<N,E> Standard implementation ofNetwork
that supports the options supplied byNetworkBuilder
.StandardValueGraph<N,V> Standard implementation ofValueGraph
that supports the options supplied byAbstractGraphBuilder
.A functional interface for graph-structured data.Traverser<N>An object that can traverse the nodes that are reachable from a specified (set of) start node(s) using a specifiedSuccessorsFunction
.Poor man's method reference forDeque::addFirst
andDeque::addLast
.Abstracts away the difference between traversing a graph vs.An implementation ofGraphConnections
for undirected graphs.An implementation ofNetworkConnections
for undirected networks with parallel edges.An implementation ofNetworkConnections
for undirected networks.ValueGraph<N,V> An interface for graph-structured data, whose edges have associated non-unique values.ValueGraphBuilder<N,V> A builder for constructing instances ofMutableValueGraph
orImmutableValueGraph
with user-defined properties.