Removing an edge just sets the edge weight to 0 #43
Another bug brought by this implementation is that neighbors related functions such as neighbors, inneighbors and outneighbors give wrong result.
julia> g = SimpleWeightedGraph([1 0 ; 0 1])
g {2, 2} undirected simple Int64 graph
julia> inneighbors(g, 2)
Int64[2]
julia> rem_edge!(g, edgetype(g)(2, 2))
julia> inneighbors(g, 2)
Int64[2] # it will be Int64[] if we use SimpleGraph or SimpleDiGraph
It is because we never dropzeros! every time we remove an edge. I think that should be corrected at least when we run neighbors because rem_edge! is explicitly declaring that link is removed so they should no longer be neighbors to each others.
Removing an edge just sets the edge weight to 0 #43
Another bug brought by this implementation is that neighbors related functions such as
neighbors,inneighborsandoutneighborsgive wrong result.It is because we never
dropzeros!every time we remove an edge. I think that should be corrected at least when we runneighborsbecauserem_edge!is explicitly declaring that link is removed so they should no longer be neighbors to each others.