JuliaGraphs / JuliaGraphs/Graphs.jl
Rename algorithms by what they return instead of their creator
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Julia
- Stars
- 538
- Forks
- 128
- Avg merge
- 10h 25m
- Merged PRs (30d)
- 2
Description
Currently, many algorithms are not discoverable unless you know who created them. We should instead export more explicit function names, and add a type-based mechanism for dispatch with a reasonable default choice.
For instance,
function dijkstra(g, v)
...
end
function a_star(g, v)
...
end
might become
struct Dijkstra end
struct Astar end
function shortest_path(::Type{Dijkstra}, g, v)
...
end
function shortest_path(::Type{Astar}, g, v)
...
end
shortest_path(g, v) = shortest_path(Dijkstra(), g, v)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing dijkstra and a_star entry points and inventorying the algorithms that would need explicit names. Define the scope of the shortest_path dispatch design, including its default choice; the work is done when the agreed algorithms expose the new naming and dispatch consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100