Crate graaf

source ·
Expand description

§Graaf

Rust-powered directed graphs.

§Table of Contents

§Representations

§Generators

  • Biclique generates a complete bipartite digraph.
  • Circuit generates a circuit digraph.
  • Complete generates a complete digraph.
  • Cycle generates a bidirectional circuit.
  • Empty generates a digraph with no arcs.
  • ErdosRenyi generates a random digraph.
  • RandomTournament generates a random tournament.
  • Star generates a star digraph.
  • Path generates a path digraph.
  • Wheel generates a wheel digraph.

§Operations

§Algorithms

§Bellman-Ford-Moore

Find the shortest distances from a source vertex to all other vertices in an arc-weighted digraph with negative weights.

A breadth-first search explores the vertices of an unweighted digraph in order of their distance from a source.

A depth-first search explores the vertices of an unweighted digraph in order of their distance from a source.

  • Dfs iterates the vertices.
  • DfsDist iterates the vertices and their distance from the source.
  • DfsPred iterates the vertices and their predecessors.
  • DfsPred::predecessors finds the predecessors.

§Dijkstra

Dijkstra’s algorithm finds the shortest paths from one or more source vertices in an arc-weighted digraph.

§Distance Matrix

A DistanceMatrix contains the shortest distances between all pairs of vertices in a digraph.

§Floyd-Warshall

The Floyd-Warshall algorithm finds the distance between each pair of vertices in an arc-weighted digraph.

§Predecessor Tree

A PredecessorTree is the result of a search and contains the predecessors of the vertices.

§Tarjan

Tarjan’s algorithm finds strongly connected components in a digraph.

Re-exports§

Modules§

  • Digraph algorithms
  • Generate parameterized and random digraphs.
  • Operations on digraphs
  • Digrpah representations.

Macros§