Struct intervaltree::IntervalTree [] [src]

pub struct IntervalTree<K, V> { /* fields omitted */ }

A simple and generic implementation of an immutable interval tree.

To build it, always use FromIterator. This is not very optimized as it takes O(log n) stack (it uses recursion) but runs in O(n log n).

Methods

impl<K: Ord, V> IntervalTree<K, V>
[src]

[src]

Queries the interval tree for all elements overlapping a given interval.

This runs in O(log n + m).

[src]

Queries the interval tree for all elements containing a given point.

This runs in O(log n + m).

[src]

Returns an iterator over all elements in the tree (in no particular order).

Trait Implementations

impl<K: Clone, V: Clone> Clone for IntervalTree<K, V>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<K: Debug, V: Debug> Debug for IntervalTree<K, V>
[src]

[src]

Formats the value using the given formatter.

impl<K: Hash, V: Hash> Hash for IntervalTree<K, V>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<K: Ord + Clone, V, I: Into<Element<K, V>>> FromIterator<I> for IntervalTree<K, V>
[src]

[src]

Creates a value from an iterator. Read more

impl<'a, K: 'a + Ord, V: 'a> IntoIterator for &'a IntervalTree<K, V>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<K, V> IntoIterator for IntervalTree<K, V>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more