Open rodrigolece opened 5 years ago
bump - cc @simonschoelly
I haven't looked into why this bug happens yet, but I doubt that triu
is the optional solution, as it allocates a new sparse matrix.
Possible solutions for this problem:
nnz
. Will use time O(n log n)
.O(1)
but has a small overhead for every mutationI would definitely be against ignoring self-edges. In many ways self-loops are just like any other edge (if dealt with carefully, for example following the convention that the adjacency matrix should have twice the weight of edges along the diagonal) and I'm almost sure that it will lead to unexpected behaviours.
I am in favour of one of the other options :)
Hi! This is my first ever contribution to someone else's package on GiiHub so please bear with me :)
I've noticed the following:
The reason is simply the definition here is not meant to be used with self loops; it only works because non-self loops are double counted. I propose that
be changed to
However, such a change breaks 3 of the test (I don't really understand why). When I run
julia runtests.jl
the output isIdeas?