Struct algebraic_equation_over_finite_prime_field::PolynomialOverP [−][src]
pub struct PolynomialOverP<T> { /* fields omitted */ }
Implementations
PolynomialOverP ring over finite prime field $F_p[x]
$
use num_traits::Zero; use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::new(vec![3, 1, 4, 1, 5], 17); let q = PolynomialOverP::<i32>::new(vec![2, 7, 1], 17); let mut r = p.clone(); let d = r.division(&q); assert!((d * q + r - p).is_zero());
degree of polynomial
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::new(vec![3, 2, 1], 5); // 3+2x+x^2 assert_eq!(p.deg(), Some(2)); let q = PolynomialOverP::<i32>::new(vec![0], 5); // 0 assert_eq!(q.deg(), None);
leading coefficent
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::new(vec![3, 2, 1], 5); // 3+2x+x^2 assert_eq!(p.lc(), Some(&1)); let q = PolynomialOverP::<i32>::new(vec![0], 5); // 0 assert_eq!(q.lc(), None);
get coefficents
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::new(vec![3, 2, 1], 5); // 3+2x+x^2 assert_eq!(p.coefs(), vec![3, 2, 1]); let q = PolynomialOverP::<i32>::new(vec![0], 5); // 0 assert_eq!(q.coefs(), vec![]);
get prime
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::new(vec![3, 2, 1], 97); // 3+2x+x^2 assert_eq!(p.prime_ref(), &97); let q = PolynomialOverP::<i32>::new(vec![0], 5); // 0 assert_eq!(q.prime_ref(), &5);
construct polynomial
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::new(vec![3, 2, 1], 5); assert_eq!(p.to_string(), "x^2+2*x+3");
pub fn from_monomial(
coefficent: T,
degree: usize,
prime: T
) -> PolynomialOverP<T> where
T: Zero,
pub fn from_monomial(
coefficent: T,
degree: usize,
prime: T
) -> PolynomialOverP<T> where
T: Zero,
construct polynomial from monomial $cx^d
$ ($c
$=coefficent, $d
$=degree)
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::from_monomial(3, 2, 5); let q = PolynomialOverP::<i32>::new(vec![0, 0, 3], 5); assert_eq!(p, q);
Make one polynomial
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::one(5); assert_eq!(p, PolynomialOverP::<i32>::new(vec![1], 5));
evaluate polynomial by Horner’s method
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::new(vec![3, 2, 1], 7); // 3+2x+x^2 assert_eq!(p.eval(&1), 6); assert_eq!(p.eval(&2), 4); assert_eq!(p.eval(&3), 4);
derivative
use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<usize>::new(vec![1, 2, 3, 2, 1], 7); // 1+2x+3x^2+2x^3+x^4 assert_eq!(p.derivative(), PolynomialOverP::<usize>::new(vec![2, 6, 6, 4], 7)); let q = PolynomialOverP::<usize>::new(vec![1, 2, 3, 4, 3, 2, 1], 5); // 1+2x+3x^2+4x^3+3x^4+2x^5+x^6 assert_eq!(q.derivative(), PolynomialOverP::<usize>::new(vec![2, 1, 2, 2, 0, 1], 5));
pub fn monic(&mut self) where
T: Clone + Eq + Zero + One + RingNormalize,
&'x T: for<'x> EuclideanRingOperation<T>,
pub fn monic(&mut self) where
T: Clone + Eq + Zero + One + RingNormalize,
&'x T: for<'x> EuclideanRingOperation<T>,
make polynomial monic
use polynomial_over_finite_prime_field::PolynomialOverP; let mut p = PolynomialOverP::<i32>::new(vec![1, 2, 3], 5); p.monic(); let q = PolynomialOverP::<i32>::new(vec![2, 4, 1], 5); assert_eq!(p, q);
polynomial division
use num_traits::Zero; use polynomial_over_finite_prime_field::PolynomialOverP; let p = PolynomialOverP::<i32>::new(vec![3, 1, 4, 1, 5], 17); let q = PolynomialOverP::<i32>::new(vec![2, 7, 1], 17); let mut r = p.clone(); let d = r.division(&q); assert!((d * q + r - p).is_zero());
Trait Implementations
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the +
operator.
pub fn add(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Add<&'a PolynomialOverP<T>>>::Output
pub fn add(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Add<&'a PolynomialOverP<T>>>::Output
Performs the +
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the +
operator.
pub fn add(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Add<&'a PolynomialOverP<T>>>::Output
pub fn add(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Add<&'a PolynomialOverP<T>>>::Output
Performs the +
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the +
operator.
pub fn add(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Add<PolynomialOverP<T>>>::Output
pub fn add(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Add<PolynomialOverP<T>>>::Output
Performs the +
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the +
operator.
pub fn add(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Add<PolynomialOverP<T>>>::Output
pub fn add(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Add<PolynomialOverP<T>>>::Output
Performs the +
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the /
operator.
pub fn div(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Div<&'a PolynomialOverP<T>>>::Output
pub fn div(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Div<&'a PolynomialOverP<T>>>::Output
Performs the /
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the /
operator.
pub fn div(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Div<&'a PolynomialOverP<T>>>::Output
pub fn div(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Div<&'a PolynomialOverP<T>>>::Output
Performs the /
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the /
operator.
pub fn div(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Div<PolynomialOverP<T>>>::Output
pub fn div(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Div<PolynomialOverP<T>>>::Output
Performs the /
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the /
operator.
pub fn div(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Div<PolynomialOverP<T>>>::Output
pub fn div(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Div<PolynomialOverP<T>>>::Output
Performs the /
operation. Read more
Performs the /=
operation. Read more
Performs the /=
operation. Read more
impl<'a, T> Mul<&'a PolynomialOverP<T>> for PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
impl<'a, T> Mul<&'a PolynomialOverP<T>> for PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the *
operator.
pub fn mul(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Mul<&'a PolynomialOverP<T>>>::Output
pub fn mul(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Mul<&'a PolynomialOverP<T>>>::Output
Performs the *
operation. Read more
impl<'a, T> Mul<&'a PolynomialOverP<T>> for &'a PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
impl<'a, T> Mul<&'a PolynomialOverP<T>> for &'a PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the *
operator.
pub fn mul(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Mul<&'a PolynomialOverP<T>>>::Output
pub fn mul(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Mul<&'a PolynomialOverP<T>>>::Output
Performs the *
operation. Read more
impl<'a, T> Mul<PolynomialOverP<T>> for &'a PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
impl<'a, T> Mul<PolynomialOverP<T>> for &'a PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the *
operator.
pub fn mul(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Mul<PolynomialOverP<T>>>::Output
pub fn mul(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Mul<PolynomialOverP<T>>>::Output
Performs the *
operation. Read more
impl<T> Mul<PolynomialOverP<T>> for PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
impl<T> Mul<PolynomialOverP<T>> for PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the *
operator.
pub fn mul(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Mul<PolynomialOverP<T>>>::Output
pub fn mul(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Mul<PolynomialOverP<T>>>::Output
Performs the *
operation. Read more
impl<'a, T> MulAssign<&'a PolynomialOverP<T>> for PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
impl<'a, T> MulAssign<&'a PolynomialOverP<T>> for PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
Performs the *=
operation. Read more
impl<T> MulAssign<PolynomialOverP<T>> for PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
impl<T> MulAssign<PolynomialOverP<T>> for PolynomialOverP<T> where
T: Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone + Ord,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Neg,
&'x T: for<'x> Mul<&'x T>,
&'x T: for<'x> Rem<&'x T>,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
<&'x T as Mul<&'x T>>::Output == T,
<&'x T as Rem<&'x T>>::Output == T,
Performs the *=
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the -
operator.
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the -
operator.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the %
operator.
pub fn rem(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Rem<&'a PolynomialOverP<T>>>::Output
pub fn rem(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Rem<&'a PolynomialOverP<T>>>::Output
Performs the %
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the %
operator.
pub fn rem(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Rem<&'a PolynomialOverP<T>>>::Output
pub fn rem(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Rem<&'a PolynomialOverP<T>>>::Output
Performs the %
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the %
operator.
pub fn rem(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Rem<PolynomialOverP<T>>>::Output
pub fn rem(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Rem<PolynomialOverP<T>>>::Output
Performs the %
operation. Read more
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the %
operator.
pub fn rem(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Rem<PolynomialOverP<T>>>::Output
pub fn rem(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Rem<PolynomialOverP<T>>>::Output
Performs the %
operation. Read more
Performs the %=
operation. Read more
Performs the %=
operation. Read more
impl<T> RingNormalize for PolynomialOverP<T> where
T: Clone + Eq + Zero + One + RingNormalize,
&'x T: for<'x> EuclideanRingOperation<T>,
impl<T> RingNormalize for PolynomialOverP<T> where
T: Clone + Eq + Zero + One + RingNormalize,
&'x T: for<'x> EuclideanRingOperation<T>,
impl<'a, T> Sub<&'a PolynomialOverP<T>> for PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
impl<'a, T> Sub<&'a PolynomialOverP<T>> for PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the -
operator.
pub fn sub(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Sub<&'a PolynomialOverP<T>>>::Output
pub fn sub(
self,
other: &PolynomialOverP<T>
) -> <PolynomialOverP<T> as Sub<&'a PolynomialOverP<T>>>::Output
Performs the -
operation. Read more
impl<'a, T> Sub<&'a PolynomialOverP<T>> for &'a PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
impl<'a, T> Sub<&'a PolynomialOverP<T>> for &'a PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the -
operator.
pub fn sub(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Sub<&'a PolynomialOverP<T>>>::Output
pub fn sub(
self,
other: &'a PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Sub<&'a PolynomialOverP<T>>>::Output
Performs the -
operation. Read more
impl<'a, T> Sub<PolynomialOverP<T>> for &'a PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
impl<'a, T> Sub<PolynomialOverP<T>> for &'a PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the -
operator.
pub fn sub(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Sub<PolynomialOverP<T>>>::Output
pub fn sub(
self,
other: PolynomialOverP<T>
) -> <&'a PolynomialOverP<T> as Sub<PolynomialOverP<T>>>::Output
Performs the -
operation. Read more
impl<T> Sub<PolynomialOverP<T>> for PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
impl<T> Sub<PolynomialOverP<T>> for PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
type Output = PolynomialOverP<T>
type Output = PolynomialOverP<T>
The resulting type after applying the -
operator.
pub fn sub(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Sub<PolynomialOverP<T>>>::Output
pub fn sub(
self,
other: PolynomialOverP<T>
) -> <PolynomialOverP<T> as Sub<PolynomialOverP<T>>>::Output
Performs the -
operation. Read more
impl<'a, T> SubAssign<&'a PolynomialOverP<T>> for PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
impl<'a, T> SubAssign<&'a PolynomialOverP<T>> for PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
Performs the -=
operation. Read more
impl<T> SubAssign<PolynomialOverP<T>> for PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
impl<T> SubAssign<PolynomialOverP<T>> for PolynomialOverP<T> where
T: Ord + Zero + for<'x> AddAssign<&'x T> + for<'x> SubAssign<&'x T> + Clone,
&'x T: for<'x> Add<&'x T>,
&'x T: for<'x> Sub<&'x T>,
&'x T: for<'x> Neg,
<&'x T as Add<&'x T>>::Output == T,
<&'x T as Sub<&'x T>>::Output == T,
<&'x T as Neg>::Output == T,
Performs the -=
operation. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for PolynomialOverP<T> where
T: RefUnwindSafe,
impl<T> Send for PolynomialOverP<T> where
T: Send,
impl<T> Sync for PolynomialOverP<T> where
T: Sync,
impl<T> Unpin for PolynomialOverP<T> where
T: Unpin,
impl<T> UnwindSafe for PolynomialOverP<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more