ash_model.paths.is_s_path

ash_model.paths.is_s_path(h, walk)[source]

Validate that a hyperedge sequence is a simple s-path.

A simple s-path here means:

  • No hyperedge appears more than once in the sequence.

  • No node participates in overlaps between more than two hyperedges (prevents reuse of the same node in non-consecutive steps).

Parameters:
  • h (ASH) – ASH instance

  • walk (List[str]) – List of hyperedge IDs forming the candidate path

Returns:

True if valid s-path, False otherwise

Return type:

bool