JuliaMath / JuliaMath/IntervalSets.jl

This package doesn't use the total order predicates

Open
#40 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
109
Forks
29
PR merge metrics
No merged PRs in 30d

Description

In [AcceleratedArrays.jl](https://github.com/andyferris/AcceleratedArrays.jl) I've been playing with "search intervals" for querying data, for example finding all the dates within a given range with the help of a sort-based acceleration index.

I've shied away from using this package because the predicates for total order used by sorting algorithms in Julia are `isequal` and `isless` and the accelerations I rely on (e.g. [this](https://github.com/andyferris/AcceleratedArrays.jl/blob/master/src/SortIndex.jl#L71-L73)) may not be valid for `<` and `==` comparisons.

I was wondering if there was a reason for chosing these operators, and whether or not we might consider it advantageous to use `isless` and `isequal` instead?

(One difficulty I have is dealing with data where some values are `missing`, where `<` and `==` aren't even predicates that return `Bool`. In this case I still expect `findall(in(0..10), array::Array{Union{Int, Missing}})` to work correctly and not crash!)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.