#interval-set #math #container

intervallum

Generic interval and interval set library

36 releases (8 stable)

new 1.4.4 May 15, 2025
1.4.1 Dec 15, 2023
1.4.0 Sep 20, 2021
1.3.0 Aug 22, 2018
0.4.8 Jun 25, 2015

#68 in Data structures

Download history 8096/week @ 2025-01-28 7621/week @ 2025-02-04 8251/week @ 2025-02-11 8577/week @ 2025-02-18 9908/week @ 2025-02-25 10750/week @ 2025-03-04 11710/week @ 2025-03-11 10174/week @ 2025-03-18 12749/week @ 2025-03-25 12226/week @ 2025-04-01 12042/week @ 2025-04-08 11357/week @ 2025-04-15 8726/week @ 2025-04-22 7656/week @ 2025-04-29 6250/week @ 2025-05-06 7390/week @ 2025-05-13

31,724 downloads per month
Used in 80 crates (9 directly)

MIT/Apache

190KB
4K SLoC

Interval Arithmetic Library

Build Status

Intervallum is a library for computing over arithmetic intervals which compiles on Rust stable. We provide many set operations such as union and intersection. The intervals can be represented with the Interval type which is just a pair of integers (such as (0,10), representing a value in the range 0 to 10), and with a IntervalSet which is a vector of intervals (such as [(0,10), (15,20)] for all values between 0 and 10, and between 15 and 20).

This library is usable, thoroughly tested and documented, however it only works on integers (i8-i64, u8-u64, usize and isize). Examples and more in the documentation.

License

Licensed under either of

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

To ensure consistency with formatting and linting, please, install pre-commit:

pip install pre-commit
pre-commit install

Dependencies

~445–730KB
~15K SLoC