ash_model.utils.matrices.adjacency_matrix¶
- ash_model.utils.matrices.adjacency_matrix(h, start=None, end=None, return_mapping=False)[source]¶
Returns the adjacency matrix of the ASH object. The adjacency matrix is a sparse matrix where rows and columns represent nodes, and the value is 1 if there is a hyperedge connecting the two nodes, 0 otherwise.
- Parameters:
- Returns:
A sparse matrix representing the adjacency matrix of the ASH.
- Return type:
scipy.sparse.csr_matrix | Tuple[scipy.sparse.csr_matrix, Dict[int, int]]