pub trait One: Sized + Mul<Output = Self> {
// Required method
fn one() -> Self;
// Provided methods
fn set_one(&mut self) { ... }
fn is_one(&self) -> bool
where Self: PartialEq { ... }
}Expand description
Complete re-export of num-traits for SciRS2 ecosystem
Defines a multiplicative identity element for Self.
§Laws
a * 1 = a ∀ a ∈ Self
1 * a = a ∀ a ∈ SelfRequired Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<F, C> One for NoisyFloat<F, C>where
F: Float,
C: FloatChecker<F>,
impl<F, C> One for NoisyFloat<F, C>where
F: Float,
C: FloatChecker<F>,
fn one() -> NoisyFloat<F, C>
Source§impl<T, C, const D: usize> One for Transform<T, C, D>where
T: RealField,
C: TCategory,
Const<D>: DimNameAdd<Const<1>>,
DefaultAllocator: Allocator<<Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
impl<T, C, const D: usize> One for Transform<T, C, D>where
T: RealField,
C: TCategory,
Const<D>: DimNameAdd<Const<1>>,
DefaultAllocator: Allocator<<Const<D> as DimNameAdd<Const<1>>>::Output, <Const<D> as DimNameAdd<Const<1>>>::Output>,
Source§impl<T, D> One for Matrix<T, D, D, <DefaultAllocator as Allocator<D, D>>::Buffer<T>>where
D: DimName,
T: Scalar + Zero + One + ClosedMulAssign + ClosedAddAssign,
DefaultAllocator: Allocator<D, D>,
impl<T, D> One for Matrix<T, D, D, <DefaultAllocator as Allocator<D, D>>::Buffer<T>>where
D: DimName,
T: Scalar + Zero + One + ClosedMulAssign + ClosedAddAssign,
DefaultAllocator: Allocator<D, D>,
Source§impl<T, R, const D: usize> One for Similarity<T, R, D>
impl<T, R, const D: usize> One for Similarity<T, R, D>
Source§fn one() -> Similarity<T, R, D>
fn one() -> Similarity<T, R, D>
Creates a new identity similarity.