ash_model.paths.temporal_s_dag¶
- ash_model.paths.temporal_s_dag(h, s, start_from=None, stop_at=None, start=None, end=None, edge=False)[source]¶
Build a time-respecting DAG over [start, end] for either hyperedges (edge=True) or nodes (edge=False). Nodes are labeled as “<id>_<tid>”. Edges connect items from different timestamps following chronological order, ensuring time-respecting properties. Only forward-in-time edges are created: from timestamp t to timestamps t’ where t’ > t.
- Parameters:
h (ASH) – The source hypergraph.
s (int) – Minimum s-incidence threshold.
start_from (int | str | List[int | str] | None) – Node or hyperedge id(s) to start from. If None, starts from all items present at the first snapshot in range.
stop_at (int | str | None) – Node or hyperedge id to stop at (optional).
start (int | None) – First snapshot ID to include. Defaults to earliest.
end (int | None) – Last snapshot ID to include. Defaults to latest.
edge (bool) – If True, operate on hyperedges. If False, operate on nodes.
- Returns:
(DAG, sources, targets) with labels “<id>_<tid>”.
- Raises:
ValueError – If the [start, end] interval is not a valid subset of the hypergraph’s snapshot IDs.
- Return type: