M2
M2 copied to clipboard
Graphs package: No error when handling negative adjacency matrices
When accidentally handing an adjacency matrix with negative entries it the "Graphs" package gives output which looks correct, but the edge set is empty.
E.g.:
A = matrix{{0,-1},{-1,0}}
G = digraph A
Should it throw an error when any entry in the adjacency matrix is negative?
@b-stone @windisch @dcookii
I even would say that an exception should be thrown if any entry of the provided adjacent matrix is not in {0, 1}.
Who would like to make the change?
I am traveling right now, but I can work on this next week if someone does not beat me to this.