Open jonschwenk opened 2 months ago
I can't recall specifics, but from what I can tell, the computation of the TopoDist variable (in Alex's original code) must have been done with a Matlab function for which there wasn't an exact replica that I could find in python. RivGraph's solution appears to have been a simple shortest path algorithm, but "shortest" refers only to the number of nodes along a path, without consideration for their actual lengths. Not 100% sure if this is the problem; trying to find Alex's original code.
Code updated to print a warning statement when computing resistance distance. Once fixed we can release a new version so it's available in conda and pip RivGraph installations.
The resistance distance function has been found to produce incorrect values when compared against other implementations.
Immediate stopgap will be to print a warning when the function is run that its output should not be trusted.