Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove DisjointSet constructor taking splatted elements #578

Closed
wants to merge 1 commit into from

Conversation

oxinabox
Copy link
Member

This closes #570
I can't work out how to do this without a breaking change.
I also can't workout how to deprecate the old behavior.

Normal julia collections do not allow construction with passing the iterator elements in.
That is why we have Tuple((1,2,3)) and tuple(1,2,3).

julia> Set(1, 2, 3)
ERROR: MethodError: no method matching Set(::Int64, ::Int64, ::Int64)
Closest candidates are:
  Set(::Any) at set.jl:21
Stacktrace:
 [1] top-level scope at REPL[1]:1

julia> Set((1, 2, 3))
Set([2, 3, 1])

@oxinabox oxinabox mentioned this pull request Feb 10, 2020
3 tasks
@oxinabox
Copy link
Member Author

There is one way I can think of deprecating it.
We deprecate the whole DisjointSets type in favour of a new DisjointSet type.
#579

@codecov
Copy link

codecov bot commented Feb 10, 2020

Codecov Report

Merging #578 into master will increase coverage by 7.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #578      +/-   ##
==========================================
+ Coverage   87.96%   95.03%   +7.07%     
==========================================
  Files          33       33              
  Lines        2110     2819     +709     
==========================================
+ Hits         1856     2679     +823     
+ Misses        254      140     -114
Impacted Files Coverage Δ
src/disjoint_set.jl 98.52% <ø> (+4.18%) ⬆️
src/DataStructures.jl 100% <ø> (ø) ⬆️
src/balanced_tree.jl 96.19% <0%> (-1.44%) ⬇️
src/heaps/binary_heap.jl 100% <0%> (ø) ⬆️
src/dict_support.jl 100% <0%> (ø) ⬆️
src/list.jl 100% <0%> (ø) ⬆️
src/int_set.jl 100% <0%> (ø) ⬆️
src/fenwick.jl 100% <0%> (ø) ⬆️
src/circular_buffer.jl 100% <0%> (ø) ⬆️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b66dbc...ede791d. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DisjointSets hangs if input is a collection of Any
1 participant