2 unstable releases
0.2.0 | Aug 12, 2024 |
---|---|
0.1.0 | Jul 5, 2024 |
#478 in Algorithms
245 downloads per month
Used in 2 crates
31KB
743 lines
Range List
rangelist
is a Rust library that implements sets of element as ranges of elements (intervals), providing efficient storage and operations for sets with contiguous data.
Users can use the provided RangeList
type or use the provided traits and iterators to use the library with their own types.
Getting Started
Install the library using cargo
:
cargo install rangelist
Read the documentation for more information about how to use the library.
License
This project is licensed under the MPL-2.0 License. See the LICENSE file for details.
lib.rs
:
A library for working with set of values represented as inclusive ranges.
This library provides a RangeList
struct that can be used to represent
sets of values as a collection of inclusive ranges. The ranges are stored
in a deduplicated sorted order.
Additionally, the library defines IntervalIterator
trait to be
implemented by types can provide an iterator of sorted inclusive
ranges. Any combination of types that implement this trait can be used
to perform standard set operations such as union and intersection.
Finally, the library provides DiffIter
, IntersectIter
, and
UnionIter
, which are lazy iterator combinators that can be used to
perform set operations on two iterators of ordered ranges.
Dependencies
~505KB