Skip to content

jbduncan/guava-graph-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a8d2ca2 · Mar 14, 2025
Jan 24, 2025
Mar 14, 2025
Nov 30, 2024
Jan 22, 2025
Apr 29, 2023
Feb 25, 2024
Mar 14, 2025
Sep 3, 2023
Mar 14, 2025
Nov 30, 2024
Mar 14, 2025
Mar 14, 2025
Mar 14, 2025

Repository files navigation

guava-graph-utils

This is a Java library with a few utilities for working with Guava graphs. Specifically:

  • MoreGraphs.buildGraph: builds an ImmutableGraph from 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 Table as 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.

About

Utilities for working with Guava graphs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages