graaf

Crates.iograaf
lib.rsgraaf
version
sourcesrc
created_at2024-03-30 15:06:09.080279
updated_at2024-10-08 14:00:37.4745
descriptionWork with directed graphs.
homepage
repositoryhttps://github.com/bsdrks/graaf
max_upload_size
id1191151
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Bas Dirks (bsdrks)

documentation

https://docs.rs/graaf

README

Graaf   Crates.io Build status API reference Coverage Status

Rust-powered directed graphs.

Table of Contents

Installation

Add this to your Cargo.toml:

[dependencies]
graaf = "0.104.0"

Representations

Arc-Weighted Sparse Digraphs

Unweighted Dense Digraphs

Unweighted Sparse Digraphs

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 without arcs.
  • ErdosRenyi generates a random digraph.
  • GrowingNetwork generates a growing network digraph.
  • Path generates a path digraph.
  • RandomTournament generates a random tournament.
  • Star generates a star digraph.
  • Wheel generates a wheel digraph.

Operations

Algorithms

Bellman-Ford-Moore

The Bellman-Ford-Moore algorithm finds the shortest distances from a source vertex to all other vertices in an arc-weighted digraph with negative weights.

Breadth-First Search

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

Depth-First Search

A depth-first search explores an unweighted digraph's vertices in order of their depth 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 in an arc-weighted digraph.

Distance Matrix

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

Floyd-Warshall

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

Johnson's Circuit-Finding Algorithm

Johnson's circuit-finding algorithm finds all circuits in a digraph.

Predecessor Tree

A PredecessorTree contains the vertex predecessors.

Tarjan

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

Changelog

See CHANGELOG.md for a list of changes.

License

Licensed under Apache License, Version 2.0 or MIT license at your option.

Contact

Feel free to reach out with questions or suggestions.

Links

Commit count: 706

cargo fmt