ash_model.paths.s_diameter

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

Compute the diameter (longest shortest-path) of 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 weighted distances if True.

  • edge (bool) – If False, compute on dual hypergraph.

Returns:

Integer diameter of the graph (0 if empty).

Return type:

int