abstractgraph/
lib.rs

1//! This crate implements standard graph algorithms without requiring
2//! a specific graph representation.
3//!
4//! It's quite common for graph structures to be defined implicitly by
5//! other data structures.  This crate lets you run standard graph
6//! algorithms without having to translate your data structures into a
7//! specific graph representation.
8//!
9//! # Usage
10//!
11//! To define a graph, implement the `DirectedGraph` trait on some
12//! data structure can be treated as agraph.  You can then run the
13//! various generic graph algorithms which take a generic type
14//! implementing `DirectedGraph`.
15//!
16//! # History
17//!
18//! This crate began as a port of the [`aga`][1] and [`agar`][2] modules
19//! from ccan.
20//!
21//! [1]: https://ccodearchive.net/info/aga.html
22//! [2]: https://ccodearchive.net/info/agar.html
23
24pub mod directedgraph;
25pub mod weight;
26
27pub use directedgraph::DirectedGraph;
28pub use directedgraph::Neighbors;
29pub use directedgraph::OutboundEdge;
30
31pub use weight::EdgeWeight;
32pub use weight::WeightedOutboundEdge;
33
34pub mod algorithms;
35pub mod graphs;