FF

Struct FF 

Source
pub struct FF<const p: i32>(/* private fields */);

Implementations§

Source§

impl<const p: i32> FF<p>

Source

pub fn new(a: i32) -> Self

Source

pub fn rep(&self) -> &i32

Trait Implementations§

Source§

impl<'a, 'b, const p: i32> Add<&'b FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'b FF<p>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, 'b, const p: i32> Add<&'b FF<p>> for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'b FF<p>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, 'b, const p: i32> Add<FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FF<p>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, 'b, const p: i32> Add for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: FF<p>) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, 'b, const p: i32> AddAssign<&'b FF<p>> for FF<p>

Source§

fn add_assign(&mut self, rhs: &'b FF<p>)

Performs the += operation. Read more
Source§

impl<'a, 'b, const p: i32> AddAssign for FF<p>

Source§

fn add_assign(&mut self, rhs: FF<p>)

Performs the += operation. Read more
Source§

impl<const p: i32> AddMon for FF<p>

Source§

fn sum<A, I>(itr: I) -> Self
where Self: AddAssign<A>, I: IntoIterator<Item = A>,

Source§

impl<const p: i32> Clone for FF<p>

Source§

fn clone(&self) -> FF<p>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const p: i32> Debug for FF<p>

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const p: i32> Default for FF<p>

Source§

fn default() -> FF<p>

Returns the “default value” for a type. Read more
Source§

impl<const p: i32> Display for FF<p>

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, 'b, const p: i32> Div<&'b FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'b FF<p>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, 'b, const p: i32> Div<&'b FF<p>> for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &'b FF<p>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, 'b, const p: i32> Div<FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FF<p>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, 'b, const p: i32> Div for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: FF<p>) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, 'b, const p: i32> DivAssign<&'b FF<p>> for FF<p>

Source§

fn div_assign(&mut self, rhs: &'b FF<p>)

Performs the /= operation. Read more
Source§

impl<'a, 'b, const p: i32> DivAssign for FF<p>

Source§

fn div_assign(&mut self, rhs: FF<p>)

Performs the /= operation. Read more
Source§

impl<const p: i32> Elem for FF<p>

Source§

impl<const p: i32> EucRing for FF<p>

Source§

fn divides(&self, y: &Self) -> bool

Source§

fn gcd(x: &Self, y: &Self) -> Self

Source§

fn gcdx(x: &Self, y: &Self) -> (Self, Self, Self)

Source§

fn lcm(x: &Self, y: &Self) -> Self

Source§

impl<const p: i32> From<i32> for FF<p>

Source§

fn from(a: i32) -> Self

Converts to this type from the input type.
Source§

impl<const p: i32> FromStr for FF<p>

Source§

type Err = <i32 as FromStr>::Err

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl<const p: i32> Mon for FF<p>

Source§

fn product<A, I>(itr: I) -> Self
where Self: MulAssign<A>, I: IntoIterator<Item = A>,

Source§

impl<'a, 'b, const p: i32> Mul<&'b FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'b FF<p>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, 'b, const p: i32> Mul<&'b FF<p>> for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'b FF<p>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, 'b, const p: i32> Mul<FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FF<p>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, 'b, const p: i32> Mul for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: FF<p>) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a, 'b, const p: i32> MulAssign<&'b FF<p>> for FF<p>

Source§

fn mul_assign(&mut self, rhs: &'b FF<p>)

Performs the *= operation. Read more
Source§

impl<'a, 'b, const p: i32> MulAssign for FF<p>

Source§

fn mul_assign(&mut self, rhs: FF<p>)

Performs the *= operation. Read more
Source§

impl<'a, const p: i32> Neg for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<const p: i32> Neg for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<const p: i32> One for FF<p>

Source§

fn one() -> Self

Returns the multiplicative identity element of Self, 1. Read more
Source§

fn is_one(&self) -> bool

Returns true if self is equal to the multiplicative identity. Read more
Source§

fn set_one(&mut self)

Sets self to the multiplicative identity element of Self, 1.
Source§

impl<const p: i32> PartialEq for FF<p>

Source§

fn eq(&self, other: &FF<p>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, 'b, const p: i32> Rem<&'b FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &'b FF<p>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, 'b, const p: i32> Rem<&'b FF<p>> for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &'b FF<p>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, 'b, const p: i32> Rem<FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: FF<p>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, 'b, const p: i32> Rem for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: FF<p>) -> Self::Output

Performs the % operation. Read more
Source§

impl<'a, 'b, const p: i32> RemAssign<&'b FF<p>> for FF<p>

Source§

fn rem_assign(&mut self, rhs: &'b FF<p>)

Performs the %= operation. Read more
Source§

impl<'a, 'b, const p: i32> RemAssign for FF<p>

Source§

fn rem_assign(&mut self, rhs: FF<p>)

Performs the %= operation. Read more
Source§

impl<const p: i32> Ring for FF<p>

Source§

fn inv(&self) -> Option<Self>

Source§

fn is_unit(&self) -> bool

Source§

fn normalizing_unit(&self) -> Self

Source§

fn from_sign(s: Sign) -> Self

Source§

fn normalized(&self) -> Self

Source§

fn into_normalized(self) -> Self

Source§

fn is_pm_one(&self) -> bool

Source§

fn c_weight(&self) -> f64

Source§

impl<'a, 'b, const p: i32> Sub<&'b FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'b FF<p>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, 'b, const p: i32> Sub<&'b FF<p>> for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'b FF<p>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, 'b, const p: i32> Sub<FF<p>> for &'a FF<p>

Source§

type Output = FF<p>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FF<p>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, 'b, const p: i32> Sub for FF<p>

Source§

type Output = FF<p>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: FF<p>) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, 'b, const p: i32> SubAssign<&'b FF<p>> for FF<p>

Source§

fn sub_assign(&mut self, rhs: &'b FF<p>)

Performs the -= operation. Read more
Source§

impl<'a, 'b, const p: i32> SubAssign for FF<p>

Source§

fn sub_assign(&mut self, rhs: FF<p>)

Performs the -= operation. Read more
Source§

impl<const p: i32> Zero for FF<p>

Source§

fn zero() -> Self

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<const p: i32> AddGrp for FF<p>

Source§

impl<'a, const p: i32> AddGrpOps<FF<p>> for &'a FF<p>

Source§

impl<const p: i32> AddGrpOps for FF<p>

Source§

impl<'a, const p: i32> AddMonOps<FF<p>> for &'a FF<p>

Source§

impl<const p: i32> AddMonOps for FF<p>

Source§

impl<const p: i32> Copy for FF<p>

Source§

impl<const p: i32> Eq for FF<p>

Source§

impl<'a, const p: i32> EucRingOps<FF<p>> for &'a FF<p>

Source§

impl<const p: i32> EucRingOps for FF<p>

Source§

impl<const p: i32> Field for FF<p>

Source§

impl<'a, const p: i32> FieldOps<FF<p>> for &'a FF<p>

Source§

impl<const p: i32> FieldOps for FF<p>

Source§

impl<'a, const p: i32> MonOps<FF<p>> for &'a FF<p>

Source§

impl<const p: i32> MonOps for FF<p>

Source§

impl<'a, const p: i32> RingOps<FF<p>> for &'a FF<p>

Source§

impl<const p: i32> RingOps for FF<p>

Source§

impl<const p: i32> StructuralPartialEq for FF<p>

Auto Trait Implementations§

§

impl<const p: i32> Freeze for FF<p>

§

impl<const p: i32> RefUnwindSafe for FF<p>

§

impl<const p: i32> Send for FF<p>

§

impl<const p: i32> Sync for FF<p>

§

impl<const p: i32> Unpin for FF<p>

§

impl<const p: i32> UnwindSafe for FF<p>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneAnd for T
where T: Clone,

Source§

fn clone_and<F>(&self, f: F) -> Self
where F: FnOnce(&mut Self),

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, Rhs> PowMod2<Rhs> for T
where T: One, Rhs: IsEven,

Source§

fn pow_mod2(self, rhs: Rhs) -> Self

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ElemBase for T
where T: Default + PartialEq + Eq + Clone + Send + Sync + Display + Debug + 'static,

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,