JuliaGraphs / JuliaGraphs/Graphs.jl
Define `rem_edge!(::AbstractGraph, ::Pair)`
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Julia
- Stars
- 538
- Forks
- 128
- Avg merge
- 10h 25m
- Merged PRs (30d)
- 2
Description
I was surprised to see that rem_edge!(::AbstractGraph, ::Pair) isn't defined:
julia> using Graphs
julia> g = path_graph(4)
{4, 3} undirected simple Int64 graph
julia> rem_edge!(g, 2 => 3)
ERROR: MethodError: no method matching rem_edge!(::SimpleGraph{Int64}, ::Pair{Int64, Int64})
Closest candidates are:
rem_edge!(::SimpleGraph{T}, ::Graphs.SimpleGraphs.SimpleEdge{T}) where T
@ Graphs ~/.julia/packages/Graphs/czpTe/src/SimpleGraphs/simplegraph.jl:519
rem_edge!(::Graphs.SimpleGraphs.AbstractSimpleGraph{T}, ::Integer, ::Integer) where T
@ Graphs ~/.julia/packages/Graphs/czpTe/src/SimpleGraphs/SimpleGraphs.jl:183
Stacktrace:
[1] top-level scope
@ REPL[5]:1
julia> add_edge!(g, 1 => 3)
true
julia> using Pkg; Pkg.status("Graphs")
Status `/private/var/folders/qz/q22pzwm144z9fq57mpf1hfp40000gq/T/jl_gltxtS/Project.toml`
[86223c79] Graphs v1.10.0
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 in src/SimpleGraphs/simplegraph.jl at rem_edge! around line 519 and src/SimpleGraphs/SimpleGraphs.jl around line 183, comparing the existing edge-removal signatures. Reproduce the Pair call shown in the issue and verify that rem_edge!(g, 2 => 3) works consistently with the existing API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100