Yuto Horikawa

Results 195 comments of Yuto Horikawa

>But probably the best would be to properly support unions of multiple disjoint intervals. The only challenge there is how to handle open/closed. Probably something like this would work: That...

>This PR also fixes https://github.com/JuliaMath/IntervalSets.jl/issues/100 btw. Great! Could you add the following tests in `test/findall.jl`? ```julia @testset "zero-step ranges" begin r = range(1,1,10) @test findall(in(1..3),r) == 1:10 @test findall(in(2..3),r) |>...

I checked the benchmarks again, and it seems there still be some performance degressions with `findall`. **Before this PR** ```julia julia> using IntervalSets, BenchmarkTools julia> i = 1..3 1..3 julia>...

Maybe, it seems better to split this PR into * Add `rev` keyword argument in `searchsorted_interval` function. * Simplify `findall` function. to merge this PR quickly.

The `searchsorted` function take O(log(n)) time, but the original `findall` function take O(1) time. **Bedore this PR** ```julia julia> using IntervalSets, BenchmarkTools julia> i = 1..3 1..3 julia> r =...

>"Quickly" is loooong gone already :) Sorry for that delay :smile: >Not sure if I understand you here... Both searchsorted and searchsorted_interval definitely take O(1) time for ranges: The searchsorted...

>`searchsorted` definitely doesn't use binary search for ranges by default Oh, that was my mistake. Thanks for the clarification. (This was already explained in this comment https://github.com/JuliaMath/IntervalSets.jl/pull/111#issuecomment-1202197404, but I overlooked...

Note that `Set([1,2,3]) < 5` is not defined. Do we really need ` Set([1,2,3]) < 5 ERROR: MethodError: no method matching isless(::Set{Int64}, ::Int64) Closest candidates are: isless(::AbstractFloat, ::Real) at operators.jl:186...

This issue was already solved in the current `master` branch. ```julia julia> using IntervalSets julia> using Dates julia> findall(in(Interval(Date(2020, 1, 8), Date(2020, 1, 22))), Date(2020):Week(1):Date(2021)) 2:4 ```

What is the status of this PR? Is this just waiting for resolving the conflicts?