Struct cuml_map::CumlTree [−][src]
pub struct CumlTree<K, V> { /* fields omitted */ }
The CumlTree
type. An unbounded mapping between ordered keys and
cumulative values, represented as a red-black tree.
Methods
impl<K, V> CumlTree<K, V>
[src]
impl<K, V> CumlTree<K, V>
Trait Implementations
impl<K, V> Drop for CumlTree<K, V>
[src]
impl<K, V> Drop for CumlTree<K, V>
impl<K, V> CumlMap for CumlTree<K, V> where
K: Add<Output = K> + Sub<Output = K> + Zero + Clone + Ord,
V: Add<Output = V> + Sub<Output = V> + Zero + Clone + Ord,
[src]
impl<K, V> CumlMap for CumlTree<K, V> where
K: Add<Output = K> + Sub<Output = K> + Zero + Clone + Ord,
V: Add<Output = V> + Sub<Output = V> + Zero + Clone + Ord,
type Key = K
Type for the keys in this mapping.
type Value = V
Type for the values in this mapping.
fn insert(&mut self, k: Self::Key, v: Self::Value)
[src]
fn insert(&mut self, k: Self::Key, v: Self::Value)
Insert an entry into the mapping.
fn get_cuml(&self, k: Self::Key) -> Self::Value
[src]
fn get_cuml(&self, k: Self::Key) -> Self::Value
Get the cumulative value up to and including the specified key. Read more
fn get_single(&self, k: Self::Key) -> Self::Value
[src]
fn get_single(&self, k: Self::Key) -> Self::Value
Get the value at the specified key (not the cumulative value).
fn get_quantile(&self, quant: Self::Value) -> Option<Self::Key>
[src]
fn get_quantile(&self, quant: Self::Value) -> Option<Self::Key>
Get the first key at which the cumulative value equals or exceeds the specified value, if such a key exists. Note that if the result of this function is only defined if the cumulative value is non-decreasing. If you start putting negative values into your mappings, you will get strange results from this function. Read more