Crates.io | rangetree |
lib.rs | rangetree |
version | 0.1.2 |
source | src |
created_at | 2016-10-26 04:37:31.739455 |
updated_at | 2017-01-31 10:23:13.184553 |
description | Range-tree for storing non-overlapping scalar ranges. |
homepage | https://github.com/ideasman42/rangetree-rs |
repository | https://github.com/ideasman42/rangetree-rs |
max_upload_size | |
id | 7013 |
size | 53,520 |
Data type for storing non-overlapping scalar ranges. The underlying representation is a red-black tree for fast manipulation.
This may be used for tracking free ID's or ranges.
Ranges are typically integers however generic types are used,
so any type with a One
and Zero
trait (along with addition and subtraction support)
may be used.
Documentation <http://docs.rs/rangetree>
__.
Crates.io Package <http://crates.io/crates/rangetree>
__.
While the API is complete on a basic level, there are some additions that could be useful.
Range Queries: to check if a value within a range is taken.
Boolean Operations: support for performing binary operations on range-trees (and, or, xor, invert).
Set Operations: is-subset, is-superset, is-disjoint.
Interval Iterator: to loop over used or unused intervals.
This API also has ports written for:
C99 <http://github.com/ideasman42/rangetree-c>
__.
Python3 <http://github.com/ideasman42/rangetree-py>
__.
Apache 2.0, see LICENSE
file.