Struct rangetree::RangeTree [] [src]

pub struct RangeTree<TOrd: RType> { /* fields omitted */ }

Main range-tree structure.

Methods

impl<TOrd: RType> RangeTree<TOrd>
[src]

Create a new range tree.

  • range the [minimum, maximum] values (inclusive), for this range tree.
  • full When true, the tree is created with all values taken.

Clear an existing range tree.

  • full When true, the tree is reset with all values taken.

Take a value from the tree.

Note: taking a value which is already taken will panic. use retake in cases when its not know.

Take a value which may already be taken, returning true if the value didn't already exist in the tree.

Take any value from the range tree.

Check if the tree has this value (not taken).

Check if no values in the tree are taken.

Check if all values in the tree are taken.

Release a value that has been taken.

Return a vector containing [minimum, maximum] pairs (inclusive) of contiguous ranges which have been taken.

Return a vector containing [minimum, maximum] pairs (inclusive) of contiguous ranges which have not been taken.