#interval-set #interval-math #math

intervallum

Generic interval and interval set library

36 releases (8 stable)

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

#55 in Algorithms

Download history 23136/week @ 2025-08-05 29342/week @ 2025-08-12 39807/week @ 2025-08-19 51755/week @ 2025-08-26 91409/week @ 2025-09-02 165279/week @ 2025-09-09 14672/week @ 2025-09-16 13569/week @ 2025-09-23 15213/week @ 2025-09-30 16954/week @ 2025-10-07 17177/week @ 2025-10-14 16470/week @ 2025-10-21 15105/week @ 2025-10-28 7747/week @ 2025-11-04 8398/week @ 2025-11-11 9191/week @ 2025-11-18

43,311 downloads per month
Used in 75 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

~0.5–0.9MB
~18K SLoC