ash_model.paths.walks.all_shortest_s_paths

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

Compute shortest s-paths for all hyperedge pairs (or from a source).

When hyperedge_a is given, returns shortest paths from that source to all other hyperedges. Otherwise, returns shortest paths for every unordered pair, keyed both ways for convenience.

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:

Dict mapping (u,v) to list of shortest paths.

Return type:

Dict[Tuple[str, str], List[List[str]]]