xgraph 3.0.0

Graph algorithms for Rust: shortest paths, centrality, connectivity, spanning trees and community detection, over directed, undirected and heterogeneous multigraphs
Documentation
//! Storage-agnostic core of the library.
//!
//! Everything in this module is expressed in terms of the [`GraphView`] abstraction rather
//! than a concrete graph type. That is what lets a single implementation of an algorithm
//! serve both the homogeneous [`Graph`](crate::graph::Graph) and the heterogeneous
//! [`HeterogeneousGraph`](crate::hgraph::HeterogeneousGraph) — previously each algorithm
//! existed twice, and the two copies had already drifted apart in their error handling and
//! their trait bounds.
//!
//! The dependency direction is strict: `core` knows nothing about the concrete graphs, the
//! CSV adapters, or the `graph`/`hgraph` cargo features. The concrete types depend on
//! `core` by implementing [`GraphView`], never the other way round.

pub mod algo;
pub mod csr;
pub mod filter;
pub mod io;
pub mod observer;
#[cfg(feature = "serde")]
pub mod serde_util;
pub mod view;

pub use algo::{
    Bridges, Centrality, CentralityError, Connectivity, DisjointSets, DominatingSet, Predecessors,
    ShortestPath, ShortestPathError, SpanningTree, TarjanState, TopologicalError, TopologicalSort,
    Traversal, TraversalError,
};
#[cfg(feature = "community")]
pub use algo::{CommunityConfig, CommunityDetection, CommunityDetectionError};
pub use csr::CsrView;
pub use filter::{EdgeFiltered, NodeFiltered};
pub use io::{DotAttributes, DotStyle, ToDot};
pub use observer::{
    EventLog, GraphEvent, GraphObserver, IncrementalComponents, MutableGraph, Observed,
};
pub use view::{EdgeId, Generations, GraphView, Link, NodeId};