Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
row dictionary : dict
Notes
-----
If weighted is True each off diagonal cell will equal the number
of edges shared by the nodes indexing the row and column if that number is
greater than s, otherwise the cell will equal 0. If weighted is False, the off
diagonal cell will equal 1 if the nodes indexed by the row and column share at
least s edges and 0 otherwise.
"""
M = self.incidence_matrix(index=index)
if index:
return Hypergraph.__incidence_to_adjacency(M[0],s=s,weighted=weighted), M[1]
else:
return Hypergraph.__incidence_to_adjacency(M,s=s,weighted=weighted)