ash_model.paths.walks.all_shortest_s_path_lengths

ash_model.paths.walks.all_shortest_s_path_lengths(h, s, hyperedge_a=None, start=None, end=None, cutoff=None)[source]

Compute lengths of shortest s-overlap paths between hyperedges.

When hyperedge_a is provided, returns dict lengths from source to others; otherwise returns full matrix mapping each hyperedge to every other.

Parameters:
  • h (ASH) – ASH hypergraph instance.

  • s (int) – Minimum overlap size.

  • hyperedge_a (str | None) – Source hyperedge ID (optional).

  • start (int | None) – Start time bound (inclusive).

  • end (int | None) – End time bound (inclusive).

  • cutoff (int | None) – Maximum path length.

Returns:

Nested dict of distances (number of edges).

Return type:

Dict[str, Dict[str, int]]