Enum medians::ConstMedians
source · pub enum ConstMedians<T> {
Odd(T),
Even((T, T)),
}
Expand description
Enum for results of odd/even medians with simple numeric endtypes.
Convert to a single f64 by applying .into()
Variants§
Odd(T)
Odd sized data results in a single median
Even((T, T))
Even sized data results in a pair of (centered) medians
Trait Implementations§
source§impl<T> Display for ConstMedians<T>where
T: Display,
impl<T> Display for ConstMedians<T>where
T: Display,
Auto Trait Implementations§
impl<T> Freeze for ConstMedians<T>where
T: Freeze,
impl<T> RefUnwindSafe for ConstMedians<T>where
T: RefUnwindSafe,
impl<T> Send for ConstMedians<T>where
T: Send,
impl<T> Sync for ConstMedians<T>where
T: Sync,
impl<T> Unpin for ConstMedians<T>where
T: Unpin,
impl<T> UnwindSafe for ConstMedians<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Printing<T> for Twhere
T: Display,
impl<T> Printing<T> for Twhere
T: Display,
source§fn to_str(self) -> String
fn to_str(self) -> String
Method to serialize.
Decorates Vecs with square brackets and tuples with round ones.
Implementation code is in
printing.rs
.source§fn to_plainstr(self) -> String
fn to_plainstr(self) -> String
Method to serialize in minimal form (space separated, no brackets)
Implementation code is in
printing.rs
.