pub enum LegendreSymbol {
MinusOne,
Zero,
One,
}Expand description
Provides the Legendre symbol for an element modulo p The Legendre symbol is Zero if a is congruent to 0 modulo p It is equal to One if a is a square modulo p (which means it has a square root) It is equal to MinusOne if a is not a square modulo p For example, p - 1 is not a square modulo p if p is congruent to 3 modulo 4 This applies to Mersenne primes, for example
Variants§
Trait Implementations§
Source§impl PartialEq for LegendreSymbol
impl PartialEq for LegendreSymbol
impl StructuralPartialEq for LegendreSymbol
Auto Trait Implementations§
impl Freeze for LegendreSymbol
impl RefUnwindSafe for LegendreSymbol
impl Send for LegendreSymbol
impl Sync for LegendreSymbol
impl Unpin for LegendreSymbol
impl UnwindSafe for LegendreSymbol
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more