ITensor / ITensor/DataGraphs.jl
Fix `union` precedence
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 13
- Forks
- 4
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 2
Description
The precedence of data overwriting in union of DataGraphs is inconsistent with union for other types:
julia> using DataGraphs
julia> g1 = DataGraph(4);
julia> g2 = DataGraph(4);
julia> g1[1 => 2] = 1;
julia> g2[1 => 2] = 2;
julia> union(g1, g2)
DataGraph{Int64, Any, Any, Graphs.SimpleGraphs.SimpleGraph{Int64}, Graphs.SimpleGraphs.SimpleEdge{Int64}} with 4 vertices:
Base.OneTo(4)
and 0 edge(s):
with vertex data:
0-element Dictionaries.Dictionary{Int64, Any}
and edge data:
1-element Dictionaries.Dictionary{Graphs.SimpleGraphs.SimpleEdge{Int64}, Any}
Edge 1 => 2 │ 2
compared to:
julia> union(Any[1], Any[1.0])
1-element Vector{Any}:
1
Contributor guide
No contributing guide indexed for this repository
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 reproducing the two union examples in the issue and locate the DataGraph union entry point. Compare its overwrite behavior with Julia's union example; done means the DataGraph result follows the same precedence as union for other types, with the behavior covered by a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100