rangetree 0.1.2

Range-tree for storing non-overlapping scalar ranges.
Documentation
  • Coverage
  • 82.35%
    14 out of 17 items documented0 out of 16 items with examples
  • Size
  • Source code size: 53.66 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.19 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ideasman42/rangetree-rs
    7 2 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ideasman42

Range Tree

Data type for storing non-overlapping scalar ranges. The underlying representation is a red-black tree for fast manipulation.

Usage

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>__.

Further Work

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.

Ports

This API also has ports written for:

  • C99 <http://github.com/ideasman42/rangetree-c>__.
  • Python3 <http://github.com/ideasman42/rangetree-py>__.

License

Apache 2.0, see LICENSE file.