pub type Total<T> = Constrained<T, IsFloat>;Expand description
IEEE 754 floating-point representation with non-standard total ordering and hashing.
This Constrained type applies no constraints and no divergence. It can trivially replace
primitive floating point types and implements the standard Eq and Ord traits. See the
cmp module for more details about these relations.
Aliased Type§
pub struct Total<T> { /* private fields */ }Implementations§
Source§impl<T> Total<T>where
T: Primitive,
impl<T> Total<T>where
T: Primitive,
Sourcepub fn from_slice<'a>(slice: &'a [T]) -> &'a [Self]
pub fn from_slice<'a>(slice: &'a [T]) -> &'a [Self]
Converts a slice of primitive IEEE 754 floating-point values into a slice of Totals.
Unlike try_from_slice, this conversion is infallible and trivial and so has O(1) time
complexity.
Sourcepub fn from_mut_slice<'a>(slice: &'a mut [T]) -> &'a mut [Self]
pub fn from_mut_slice<'a>(slice: &'a mut [T]) -> &'a mut [Self]
Converts a mutable slice of primitive floating-point values into a mutable slice of
Totals.
Unlike try_from_mut_slice, this conversion is infallible and trivial and so has O(1)
time complexity.
Trait Implementations§
Source§impl<T> From<Constrained<T, IsExtendedReal<OrPanic>>> for Total<T>where
T: Primitive,
impl<T> From<Constrained<T, IsExtendedReal<OrPanic>>> for Total<T>where
T: Primitive,
Source§fn from(other: ExtendedReal<T>) -> Self
fn from(other: ExtendedReal<T>) -> Self
Converts to this type from the input type.