Memory efficient sets with ranges of elements. https://github.com/phadej/range-set-list#readme
|Version on this page:||[email protected]:1|
|LTS Haskell 15.14:||[email protected]:1|
|Stackage Nightly 2020-05-26:||[email protected]:1|
|Latest on Hackage:||[email protected]:1|
A few trivial implementations of range sets.
You can find the package (and its documentation) on hackage.
This module is intended to be imported qualified, to avoid name clashes with Prelude functions, e.g.,
import Data.RangeSet.List (RSet) import qualified Data.RangeSet.List as RSet
This package contains two implementations of exactly the same interface, plus one specialization, all of which provide exactly the same behavior:
- “Data.RangeSet.List” implements the simplest
RSetbased on list. Set construction and manipulation is most efficient for this version, but lookups may require a full list traversal.
- “Data.RangeSet.Map” implements a slightly less simple
RSetbased on map. Construction and manipulation have more overhead in this version, but lookups are significantly faster, especially for large sets.
- “Data.RangeSet.IntMap” is simply a specialization of “Data.RangeSet.Map” to Ints based on IntMap.
The implementation assumes that
x < succ x pred x < x
and there aren’t elements in between (not true for
pred are never called for largest or smallest value respectively.
- Data.RangeSet.Map.member doesn’t require Enum
- Map implementations:
- Consider API stable
- Complement sets (require
- Dependencies update
- More quickcheck properties
- Initial release