algograph/graph/mod.rs
1//! Traits and implementations for directed and undirected graphs and useful graph wrappers.
2//!
3//! # Low-level graphs and `TaggedGraph`
4//!
5//! Some graph libraries allow customized types of vertices and edges.
6//! But for algorithm authors, these customized types are hard to deal with.
7//! Can we copy a vertex?
8//! What is the cost of doing that copying?
9//!
10//! In this crate, there are traits and implementations of low level graphs.
11//! Vertices and edges in low level graphs are lightweight ID's.
12//! They are essentially `usize`.
13//! Algorithm authors may feel free to copy and store these ID's.
14//!
15//! There is also `TaggedGraph` to let vertices and edges be tagged.
16//! Users may usually experience `TaggedGraph` as easy as those with customized vertice types and edge types in other crates.
17//!
18//! # Graph wrappers
19//!
20//! ## `ShadowedSubgraph` and `SelectedSubgraph`
21//!
22//! They can form subgraphs with shadowed/selected vertices and edges.
23//! Futhermore, these subgraphs are shrinkable.
24//! While they are shrinking, their underlying graphs are kept unchanged.
25//!
26//! ## `MappedGraph`
27//!
28//! It wraps a graph and how its vertices and edges are mapped from another graph.
29
30mod vertex;
31pub use self::vertex::*;
32mod edge;
33pub use self::edge::*;
34mod r#trait;
35pub use self::r#trait::*;
36mod mapped_graph;
37pub use self::mapped_graph::*;
38mod shadowed_subgraph;
39pub use self::shadowed_subgraph::*;
40mod selected_subgraph;
41pub use self::selected_subgraph::*;
42mod graph_debug;
43
44pub mod directed;
45pub mod undirected;