Struct veb_rs::VEBTree
[−]
[src]
pub struct VEBTree { /* fields omitted */ }
The van Emde Boas tree itself.
Methods
impl VEBTree
[src]
fn new(max_elem: i64) -> Result<Self, &'static str>
Generates a new van Emde Boas tree. Will return an error if the input is less than 1 or greater than the max value of an isize.
fn minimum(&self) -> Option<i64>
Returns the lowest value stored in the tree, or None if it's empty. Takes constant time.
fn maximum(&self) -> Option<i64>
Returns the highest value stored in the tree, or None if it's empty. Takes constant time.
fn universe(&self) -> i64
Returns the maximum value it's possible to store in the tree. Takes constant time.
fn is_empty(&self) -> bool
Returns true if the tree is empty. Takes constant time.
fn has(&self, x: i64) -> bool
Returns true if this van Emde Boas tree contains the specified value. Takes O(log(log(U))) time, where U is the argument to the constructor.
fn find_next(&self, x: i64) -> Option<i64>
Finds the next highest value in this van Emde Boas tree, or None if it doesn't exit. Takes O(log(log(U))) time, where U is the argument to the constructor.
fn insert(&mut self, x: i64)
Insert a value into this van Emde Boas tree. Takes O(log(log(U))) time, where U is the argument to the constructor.
fn delete(&mut self, x: i64)
Removes an element from this van Emde Boas tree. Takes O(log(log(U))) time, where U is the argument to the constructor.
Trait Implementations
impl Debug for VEBTree
[src]
impl Clone for VEBTree
[src]
fn clone(&self) -> VEBTree
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