ultragraph 0.8.3

Hypergraph data structure.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::{GraphError, GraphView};

pub trait GraphTraversal<N, W>: GraphView<N, W> {
    // --- Traversal ---

    /// Returns a non-allocating iterator over the direct successors (outgoing edges) of node `a`.
    fn outbound_edges(&self, a: usize) -> Result<impl Iterator<Item = usize> + '_, GraphError>;

    /// Returns a non-allocating iterator over the direct predecessors (incoming edges) of node `a`.
    fn inbound_edges(&self, a: usize) -> Result<impl Iterator<Item = usize> + '_, GraphError>;
}