pub struct Roots<const N: usize> { /* private fields */ }Expand description
Tagged root container for N roots.
Types are packed 3 bits per root into a u64, identical to C++ Roots<N>.
For complex conjugate pairs, slot i holds the real part and slot i+1 holds
the imaginary part; both slots are tagged Complex.
Implementations§
Source§impl Roots<2>
impl Roots<2>
Source§impl Roots<3>
impl Roots<3>
Sourcepub fn uniform(t: RootType, x: f64) -> Self
pub fn uniform(t: RootType, x: f64) -> Self
All three slots get the same type and value.
C++ Roots<3>(type, x).
Sourcepub fn concat_1_2(a: Roots<1>, b: Roots<2>) -> Self
pub fn concat_1_2(a: Roots<1>, b: Roots<2>) -> Self
Concatenate Roots<1> then Roots<2>.
C++ Roots<3>(Roots<1>, Roots<2>).
Sourcepub fn concat_2_1(a: Roots<2>, b: Roots<1>) -> Self
pub fn concat_2_1(a: Roots<2>, b: Roots<1>) -> Self
Concatenate Roots<2> then Roots<1>.
C++ Roots<3>(Roots<2>, Roots<1>).
Trait Implementations§
impl<const N: usize> Copy for Roots<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Roots<N>
impl<const N: usize> RefUnwindSafe for Roots<N>
impl<const N: usize> Send for Roots<N>
impl<const N: usize> Sync for Roots<N>
impl<const N: usize> Unpin for Roots<N>
impl<const N: usize> UnsafeUnpin for Roots<N>
impl<const N: usize> UnwindSafe for Roots<N>
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