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]

Important traits for QueryIter<'a, K, V>

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

This runs in O(log n + m).

Important traits for QueryIter<'a, K, V>

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

This runs in O(log n + m).

Important traits for TreeIter<'a, K, V>

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

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

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

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]

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?

Important traits for TreeIter<'a, K, V>

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?

Important traits for TreeIntoIter<K, V>

Creates an iterator from a value. Read more

Auto Trait Implementations

impl<K, V> Send for IntervalTree<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for IntervalTree<K, V> where
    K: Sync,
    V: Sync