strongly-connected-components 1.0.0

Decomposes a graph into Strongly Connected Components and to sorts them in topological order.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// Represents a single node of the graph.
/// A node can be created by calling [`Graph::new_node()`](crate::Graph::new_node).
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Node {
    pub(super) id: usize,
}

impl std::fmt::Debug for Node {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "Node({})", self.id)
    }
}