Struct stats::Unsorted
[−]
[src]
pub struct Unsorted<T> { /* fields omitted */ }
A commutative data structure for lazily sorted sequences of data.
The sort does not occur until statistics need to be computed.
Note that this works on types that do not define a total ordering like
f32
and f64
. When an ordering is not defined, an arbitrary order
is returned.
Methods
impl<T: PartialOrd> Unsorted<T>
[src]
pub fn new() -> Unsorted<T>
[src]
Create initial empty state.
pub fn add(&mut self, v: T)
[src]
Add a new element to the set.
pub fn len(&self) -> usize
[src]
Return the number of data points.
impl<T: PartialOrd + Eq + Clone> Unsorted<T>
[src]
pub fn cardinality(&mut self) -> usize
[src]
impl<T: PartialOrd + Clone> Unsorted<T>
[src]
impl<T: PartialOrd + ToPrimitive> Unsorted<T>
[src]
Trait Implementations
impl<T: Clone> Clone for Unsorted<T>
[src]
fn clone(&self) -> Unsorted<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: PartialOrd> Commute for Unsorted<T>
[src]
fn merge(&mut self, v: Unsorted<T>)
[src]
Merges the value other
into self
.
fn consume<I: Iterator<Item = Self>>(&mut self, other: I)
[src]
Merges the values in the iterator into self
.
impl<T: PartialOrd> Default for Unsorted<T>
[src]
impl<T: PartialOrd> FromIterator<T> for Unsorted<T>
[src]
fn from_iter<I: IntoIterator<Item = T>>(it: I) -> Unsorted<T>
[src]
Creates a value from an iterator. Read more
impl<T: PartialOrd> Extend<T> for Unsorted<T>
[src]
fn extend<I: IntoIterator<Item = T>>(&mut self, it: I)
[src]
Extends a collection with the contents of an iterator. Read more