Struct teardown_tree___treap::set::TreapSet [] [src]

pub struct TreapSet<T> { /* fields omitted */ }

A set based on a randomized treap

Methods

impl<T: Ord> TreapSet<T>
[src]

Returns a new empty set.

let mut s = treap::TreapSet::new();
assert_eq!(s.len(), 0);
s.insert(5);

Returns the number of elements in the set.

Remove all elements from the set.

Returns true if the set is empty.

Returns true if the item is in the set.

Add a item to the set. Returns true if the item was not in the set already.

Remove a item from the set. Returns true if the item was in the set.