Currently there is an implicit assumption that an adjacency matrix
M =
[[0, 1],
[0, 0]]
encodes the graph 0 -> 1.
This is the row->col interpretation:
M[X, Y] = 1 $\iff$ X -> Y.
The col->row interpretation is the opposite:
M[X, Y] = 1 $\iff$ X <- Y.
Undirected edges are unaffected by this, as
M[X, Y] = 2 $\vee$ M[Y, X] = 2 $\iff$ X -- Y.
This PR forces the users of the gadjid_python library to supply either the string "row->col" or "col->row" when passing an adjacency matrix in scipy.sparse or np.ndarray format.
Currently there is an implicit assumption that an adjacency matrix
encodes the graph
0 -> 1
.This is the
row->col
interpretation:M[X, Y] = 1
$\iff$X -> Y
.The
col->row
interpretation is the opposite:M[X, Y] = 1
$\iff$X <- Y
.Undirected edges are unaffected by this, as
M[X, Y] = 2
$\vee$M[Y, X] = 2
$\iff$X -- Y
.This PR forces the users of the gadjid_python library to supply either the string
"row->col"
or"col->row"
when passing an adjacency matrix inscipy.sparse
ornp.ndarray
format.