This is a Java library with a few utilities for working with Guava graphs. Specifically:
- MoreGraphs.buildGraph: builds an- ImmutableGraphfrom a set of starting nodes and a "successors function". The successors function is applied in a breadth-first manner to the starting nodes, then their children, then their grand-children, and so on and so forth until all descendants have been traversed.
- MoreGraphs.asValueGraph: wraps a Guava- Tableas a- ValueGraph.
- MoreGraphs.topologicalOrdering: returns a topological ordering of the given graph; that is, a traversal of the graph in which each node is visited only after all its predecessors and other ancestors have been visited.
- MoreGraphs.lazyTopologicalOrdering: returns a lazy view of the topological ordering of the given graph.
- MoreGraphs.topologicalOrderingStartingFrom: returns a topological ordering of the subgraph of the given graph that starts from the given nodes.
- MoreGraphs.union: returns a view of the union of the given graphs.
- MoreGraphs.pageRanks: returns the page ranks of all nodes of the given graph as per the PageRank algorithm.
See these methods' javadocs for more information.