pub enum DeterminantSign {
Negative,
Zero,
Positive,
}Expand description
The exact sign of a determinant.
Available with the exact Cargo feature.
This type makes the three possible outcomes explicit instead of exposing a raw integer that could contain values other than −1, 0, or +1.
§Examples
use la_stack::prelude::*;
let sign = Matrix::<2>::identity().det_sign_exact();
assert_eq!(sign, DeterminantSign::Positive);
assert_eq!(sign.as_i8(), 1);Variants§
Negative
The determinant is strictly negative.
Zero
The determinant is exactly zero.
Positive
The determinant is strictly positive.
Implementations§
Trait Implementations§
Source§impl Clone for DeterminantSign
impl Clone for DeterminantSign
Source§fn clone(&self) -> DeterminantSign
fn clone(&self) -> DeterminantSign
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DeterminantSign
Source§impl Debug for DeterminantSign
impl Debug for DeterminantSign
impl Eq for DeterminantSign
Source§impl PartialEq for DeterminantSign
impl PartialEq for DeterminantSign
impl StructuralPartialEq for DeterminantSign
Auto Trait Implementations§
impl Freeze for DeterminantSign
impl RefUnwindSafe for DeterminantSign
impl Send for DeterminantSign
impl Sync for DeterminantSign
impl Unpin for DeterminantSign
impl UnsafeUnpin for DeterminantSign
impl UnwindSafe for DeterminantSign
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