Re: [julia-users] Set of tuples?

2015-10-11 Thread Rick Danielson
Also helpful is https://groups.google.com/forum/#!topic/julia-users/0cvVuOmcFpw and a clean initialization appears to be: latlon = Set(Array(Tuple{Float64,Float64},0)) push!(latlon, (68.0, 14.5)) ; in((59.0, 10.5), latlon) -> false push!(latlon, (59.0, 10.5)) ; in((59.0, 10.5), latlon) -> true

[julia-users] Set of tuples?

2014-09-05 Thread Sam L
I can't figure out how to make a set of tuples in a very clean way. This works: julia push!(Set{(Int, Int)}(), (1,2)) Set{(Int64,Int64)}({(1,2)}) but this doesn't: julia Set((1,2)) Set{Int64}({2,1}) because that calls Set{eltype(itr)}(itr). And this doesn't work: julia Set{(Int,

Re: [julia-users] Set of tuples?

2014-09-05 Thread John Myles White
How do you feel about using Set( [(1, 2)] )? — John On Sep 5, 2014, at 5:01 PM, Sam L sam.len...@gmail.com wrote: I can't figure out how to make a set of tuples in a very clean way. This works: julia push!(Set{(Int, Int)}(), (1,2)) Set{(Int64,Int64)}({(1,2)}) but this doesn't:

Re: [julia-users] Set of tuples?

2014-09-05 Thread Sam Lendle
Oh right, thanks! I forgot that works. I'd just used that like an hour ago for strings. On Fri, Sep 5, 2014 at 5:02 PM, John Myles White johnmyleswh...@gmail.com wrote: How do you feel about using Set( [(1, 2)] )? — John On Sep 5, 2014, at 5:01 PM, Sam L sam.len...@gmail.com wrote: I