rust_igraph/lib.rs
1//! # rust-igraph
2//!
3//! Pure-Rust port of the [igraph](https://igraph.org) network analysis
4//! library. Targets full API parity with igraph C v1.0.x (~850 public
5//! functions), validated continuously against the three official
6//! implementations (igraph C, python-igraph, R-igraph).
7//!
8//! > **Status**: alpha — only the Phase 0 walking-skeleton API is shipped
9//! > (`Graph`, `read_edgelist`, `bfs`). The catalog grows
10//! > algorithm-by-algorithm through Phase 1-10. See the project's
11//! > [master plan](https://github.com/Totoro-jam/rust-igraph/blob/main/docs/plans/MASTER_PLAN.md).
12//!
13//! ## Quick start
14//!
15//! ```
16//! use rust_igraph::{Graph, bfs};
17//!
18//! let mut g = Graph::with_vertices(4);
19//! g.add_edge(0, 1).unwrap();
20//! g.add_edge(0, 2).unwrap();
21//! g.add_edge(1, 3).unwrap();
22//!
23//! let order = bfs(&g, 0).unwrap();
24//! assert_eq!(order, vec![0, 1, 2, 3]);
25//! ```
26//!
27//! ## License
28//!
29//! GPL-2.0-or-later, matching upstream igraph.
30
31pub mod algorithms;
32pub mod core;
33
34// Top-level re-exports for the common case.
35pub use crate::algorithms::io::read_edgelist;
36pub use crate::algorithms::traversal::bfs;
37pub use crate::core::error::{IgraphError, IgraphResult};
38pub use crate::core::graph::{Graph, VertexId};