bundles / scipy 1.17.1 / scipy / sparse / csgraph / _flow / _add_reverse_edges
cython_function_or_method
scipy.sparse.csgraph._flow:_add_reverse_edges
Signature
def _add_reverse_edges ( a ) Summary
Add reversed edges to all edges in a graph.
Extended Summary
This adds to a given directed weighted graph all edges in the reverse direction and give them weight 0, unless they already exist.
Parameters
a: csr_arrayThe square matrix in CSR format representing a directed graph
Returns
res: csr_arrayA new matrix in CSR format in which the missing edges are represented by explicit zeros.
Aliases
-
scipy.sparse.csgraph._flow._add_reverse_edges