Struct teardown_tree::IntervalTeardownTreeSet
[−]
[src]
pub struct IntervalTeardownTreeSet<Iv: Interval> { /* fields omitted */ }
Methods
impl<Iv: Interval> IntervalTeardownTreeSet<Iv>
[src]
fn new(items: Vec<Iv>) -> IntervalTeardownTreeSet<Iv>
Creates a new IntervalTeardownTreeSet
with the given set of intervals. The items can be
given in any order. Duplicates are supported.
fn with_sorted(sorted: Vec<Iv>) -> IntervalTeardownTreeSet<Iv>
Creates a new IntervalTeardownTreeSet
with the given set of intervals. Duplicates are
supported.
Note: the items are assumed to be sorted!
fn contains<Q>(&self, query: &Q) -> bool where Q: Interval<K=Iv::K> + PartialOrd<Iv>
Returns true if the set contains the given item.
fn query_overlap<'a, Q, S>(&'a self, query: &Q, sink: &mut S) where Q: Interval<K=Iv::K>, S: Sink<&'a Iv>
Executes an overlap query.
fn delete<Q>(&mut self, query: &Q) -> bool where Q: Interval<K=Iv::K> + PartialOrd<Iv>
Deletes the given interval from the tree and returns true (or false if it was not found).
fn delete_overlap<Q, S>(&mut self, query: &Q, sink: S) where Q: Interval<K=Iv::K>, S: Sink<Iv>
Deletes all intervals that overlap with query
from the tree and and feeds them into
sink
. The items are returned in order.
fn filter_overlap<Q, Flt, S>(&mut self, query: &Q, f: Flt, sink: S) where Q: Interval<K=Iv::K>, Flt: ItemFilter<Iv>, S: Sink<Iv>
Deletes all intervals that overlap with query
and match the filter from the tree and
feeds them into sink
. The items are returned in order.
fn size(&self) -> usize
Returns the number of items in this tree.
fn is_empty(&self) -> bool
fn clear(&mut self)
Removes all items from the tree (the items are dropped, but the internal storage is not).
Trait Implementations
impl<Iv: Clone + Interval> Clone for IntervalTeardownTreeSet<Iv>
[src]
fn clone(&self) -> IntervalTeardownTreeSet<Iv>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more