ash_model.utils.projections.line_graph_projection

ash_model.utils.projections.line_graph_projection(h, s=1, start=None, end=None, keep_attrs=False)[source]

Returns a NetworkX Graph object that is the line graph projection of the given ASH object. The line graph projection of a hypergraph is a graph constructed by placing an edge between every pair of hyperedges that share at least one node.

Parameters:
  • h (ASH) – The ASH object to be projected.

  • s (int) – The size of the edge overlap.

  • end (int | None) – The end time of the projection (optional).

  • keep_attrs (bool) – If True, the attributes of the nodes in the ASH will be preserved in the resulting NetworkX graph.

  • start (int | None) –

Returns:

A NetworkX Graph object representing the line graph projection of the ASH.

Return type:

Graph