[−][src]Struct stats::Unsorted
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]
pub fn mode(&mut self) -> Option<T>
[src]
Returns the mode of the data.
pub fn modes(&mut self) -> Vec<T>
[src]
Returns the modes of the data.
impl<T: PartialOrd + ToPrimitive> Unsorted<T>
[src]
Trait Implementations
impl<T: Clone> Clone for Unsorted<T>
[src]
impl<T: PartialOrd> Commute for Unsorted<T>
[src]
fn merge(&mut self, v: Unsorted<T>)
[src]
fn consume<I: Iterator<Item = Self>>(&mut self, other: I)
[src]
impl<T: PartialOrd> Default for Unsorted<T>
[src]
impl<T: PartialOrd> Extend<T> for Unsorted<T>
[src]
fn extend<I: IntoIterator<Item = T>>(&mut self, it: I)
[src]
impl<T: PartialOrd> FromIterator<T> for Unsorted<T>
[src]
fn from_iter<I: IntoIterator<Item = T>>(it: I) -> Unsorted<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Unsorted<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Unsorted<T> where
T: Send,
T: Send,
impl<T> Sync for Unsorted<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Unsorted<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Unsorted<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,