You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The distances() function ignores the mode parameter when algorithm='johnson' because igraph_distances_johnson() does not support setting the mode: igraph/igraph#2193
This can lead to confusion and invalid results.
I suggest that when algorithm='johnson' and mode != 'all' for undirected or mode != 'out' for directed an error should be thrown.
Notice that since the default mode is 'all', the graph is treated as undirected by both the default algorithm and Dijkstra. But with Johnson it is unexpectedly treated as directed.
Version information
R/igraph version: 1.3.4
The text was updated successfully, but these errors were encountered:
BTW I find it very strange that the default mode is all and not out. I would expect the function to respect the directedness of the graph by default. But this is not something we can change unfortunately.
7a34b43 now throws an error when Johnson's algorithm would be invoked with mode="in" or mode="all" (and forces the mode to be "out" for the undirected case).
Describe the bug
The
distances()
function ignores themode
parameter whenalgorithm='johnson'
becauseigraph_distances_johnson()
does not support setting the mode: igraph/igraph#2193This can lead to confusion and invalid results.
I suggest that when
algorithm='johnson'
andmode != 'all'
for undirected ormode != 'out'
for directed an error should be thrown.To reproduce
Notice that since the default mode is
'all'
, the graph is treated as undirected by both the default algorithm and Dijkstra. But with Johnson it is unexpectedly treated as directed.Version information
The text was updated successfully, but these errors were encountered: