ash_model.paths.all_simple_paths

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

Generate all simple, s-overlap-valid paths in a hypergraph’s line graph.

A simple path is one with no repeated hyperedges, and additionally, the sequence must satisfy the s-overlap condition in the original hypergraph.

Internally, this projects the hypergraph into its s-line-graph and then yields each NetworkX simple path that also passes the is_s_path filter.

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

  • s (int) – Minimum overlap size between consecutive hyperedges.

  • hyperedge_a (str | None) – Identifier of the starting hyperedge (optional). If None, paths may start from any node.

  • hyperedge_b (str | None) – Identifier of the ending hyperedge (optional). If None, paths may end at any node.

  • start (int | None) – Lower time bound for hyperedges (inclusive).

  • end (int | None) – Upper time bound for hyperedges (inclusive).

  • cutoff (int | None) – Maximum path length (number of nodes) to explore.

Returns:

Iterator over valid paths, each as a list of hyperedge IDs.

Return type:

Iterator[List[str]]