hypergraph_distance

Function hypergraph_distance 

Source
pub fn hypergraph_distance<N, E, Ix>(
    hypergraph: &Hypergraph<N, E, Ix>,
    source: &N,
    target: &N,
) -> Option<usize>
where N: Node + Clone + Ord + Debug, E: EdgeWeight, Ix: IndexType,
Expand description

Compute the distance between two nodes in a hypergraph

Distance is the minimum number of hyperedges needed to connect two nodes.

§Arguments

  • hypergraph - The hypergraph to analyze
  • source - Source node
  • target - Target node

§Returns

  • The distance, or None if nodes are not connected