ash_model.paths.average_s_distance

ash_model.paths.average_s_distance(h, s, start=None, end=None, weight=False, edge=True)[source]

Compute the average shortest-path length in the s-line-graph.

Parameters:
  • h (ASH) – ASH instance.

  • s (int) – Minimum overlap size.

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

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

  • weight (bool) – Use edge weight attribute ‘w’ if True (unused here).

  • edge (bool) – (Unused) Included for API consistency.

Returns:

Average distance across all connected pairs.

Return type:

float