UrbanAnalyst / dodgr

Distances on Directed Graphs in R
https://urbananalyst.github.io/dodgr/
127 stars 16 forks source link

Incorrect note in docs about igraph caching #233

Closed szhorvat closed 2 months ago

szhorvat commented 2 months ago

The compare_heaps documentation contains this note:

igraph caches intermediate results of graph processing, so the igraph comparisons will be faster on subsequent runs. To obtain fair comparisons, run only once or re-start the current R session.

This is incorrect. When the note was added in 2017, igraph did not cache anything. Since the recently released version 2.0, igraph does cache basic properties in the graph, such as whether loops or multi-edges are present, or whether the graph is connected. This is because these properties need to be checked by many functions to validate their input. However, the distances() function, which is discussed here, does not touch the cache at all.

mpadge commented 2 months ago

Thank you very much @szhorvat for noting that, which the above commit fixes.

I'll also take the opportunity to express my gratitude for your work on igraph, which I've been hearing about from @maelle. You'd also be an ideal person to have an opinion on long-standing issue #117 - If you've got time, I'd really appreciate your thoughts on the usefulness of exposing a variety of heap-sorting algorithms. This package was initially an academic exercise for which compare_heaps was important. Nevertheless, I'm pretty sure hardly anyone ever bothers to use anything other than the standard binary heap, and igraph gets by just fine with a single heap implementation too. Your insight would be really appreciated!