Digraphs
Digraphs copied to clipboard
Renamed `DigraphDijkstra` to `DigraphShortestPaths`
https://github.com/digraphs/Digraphs/issues/570
This is looking good! The only problem now (which I didn't mention before) is that we want to preserve backwards compatibility. So, now that DigraphDijkstra is gone, we want to introduce DigraphDijkstra as a synonym for DigraphShortestPaths. Look at how DeclareSynonym is used elsewhere in the package, and add new commits to this branch to add them to this PR.
Might even make sense to do something like we do is Semigroups and mark DigraphDijkstra as obsolete:
https://github.com/semigroups/Semigroups/blob/7cc3070a8fda8d9b866b5864357dff491c133eb9/gap/obsolete.gi#L11
Currently, I have renamed DigraphDijkstra to DigraphShortestPaths and also declared it as a synonym using DeclareSynonym. Please let me know if I should proceed with https://github.com/digraphs/Digraphs/issues/735.
I had a suggestion on how to implement https://github.com/digraphs/Digraphs/issues/735 as well:
- We could define a helper function
DeclareDeprecatedSynonymwhich creates something like a wrapper that prints the warning and uses theApplyfucntion of GAP to forward the arbitrary number of arguments to the new function. - We can then bind this wrapper to the name
DigraphDijkstra(astringas can be seen inDeclareSynonym) using aDeclareDeprecatedSynonym. This way every call toDigraphDijkstratriggers the warning before executingDigraphShortestPathsand then can run the updated function name which isDigraphShortestPathsin this case.
This is dependent on #742, and should be updated before being merged.