pub struct DensePolynomialConfig<'a, S: SemiringConfig, const DEGREE_PLUS_ONE: usize> {
pub cfg: &'a S,
}Expand description
Configuration of the polynomial semiring $S[X]$ over the (semi)ring
configured by S, with [DynamicPolynomial] as its element.
Implements exactly the layer its coefficients provide: [SemiringConfig]
over a semiring, additionally [RingConfig] over a ring. The polynomial
ring is never a field, hence no [FieldConfig]; Euclidean division (which
needs coefficient inversion), evaluation and other polynomial-specific
operations are provided as inherent methods.
Checked operations delegate to the coefficient config’s checked
operations, so overflow behavior follows the coefficients (e.g. Int
coefficients can overflow, field coefficients cannot).
Fields§
§cfg: &'a SImplementations§
Source§impl<'a, S: SemiringConfig, const DEGREE_PLUS_ONE: usize> DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: SemiringConfig, const DEGREE_PLUS_ONE: usize> DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
Sourcepub fn new_padded(
&self,
coeffs: impl AsRef<[S::Element]>,
) -> DensePolynomial<S::Element, DEGREE_PLUS_ONE>
pub fn new_padded( &self, coeffs: impl AsRef<[S::Element]>, ) -> DensePolynomial<S::Element, DEGREE_PLUS_ONE>
Create a new polynomial with the given coefficients. If the input has fewer than N+1 coefficients, the remaining slots will be filled with zeros. If the input has more than N+1 coefficients, it will panic.
Trait Implementations§
Source§impl<'a, S: Clone + SemiringConfig, const DEGREE_PLUS_ONE: usize> Clone for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: Clone + SemiringConfig, const DEGREE_PLUS_ONE: usize> Clone for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
Source§fn clone(&self) -> DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
fn clone(&self) -> DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a, S: Debug + SemiringConfig, const DEGREE_PLUS_ONE: usize> Debug for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: Debug + SemiringConfig, const DEGREE_PLUS_ONE: usize> Debug for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
Source§impl<'a, S: PartialEq + SemiringConfig, const DEGREE_PLUS_ONE: usize> PartialEq for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: PartialEq + SemiringConfig, const DEGREE_PLUS_ONE: usize> PartialEq for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
Source§fn eq(&self, other: &DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>) -> bool
fn eq(&self, other: &DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>) -> bool
self and other values to be equal, and is used by ==.Source§impl<'a, S: RingConfig, const DEGREE_PLUS_ONE: usize> RingConfig for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: RingConfig, const DEGREE_PLUS_ONE: usize> RingConfig for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
Source§fn checked_neg(&self, x: &Self::Element) -> Option<Self::Element>
fn checked_neg(&self, x: &Self::Element) -> Option<Self::Element>
§fn neg_assign(&self, x: &mut Self::Element)
fn neg_assign(&self, x: &mut Self::Element)
Source§impl<'a, S: SemiringConfig, const DEGREE_PLUS_ONE: usize> SemiringConfig for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: SemiringConfig, const DEGREE_PLUS_ONE: usize> SemiringConfig for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
fn is_zero(&self, value: &Self::Element) -> bool
fn zero(&self) -> Self::Element
fn one(&self) -> Self::Element
Source§fn checked_add(
&self,
x: &Self::Element,
y: &Self::Element,
) -> Option<Self::Element>
fn checked_add( &self, x: &Self::Element, y: &Self::Element, ) -> Option<Self::Element>
Source§fn checked_sub(
&self,
x: &Self::Element,
y: &Self::Element,
) -> Option<Self::Element>
fn checked_sub( &self, x: &Self::Element, y: &Self::Element, ) -> Option<Self::Element>
Source§fn checked_mul(
&self,
_x: &Self::Element,
_y: &Self::Element,
) -> Option<Self::Element>
fn checked_mul( &self, _x: &Self::Element, _y: &Self::Element, ) -> Option<Self::Element>
Source§fn checked_pow_u32(&self, x: &Self::Element, y: u32) -> Option<Self::Element>
fn checked_pow_u32(&self, x: &Self::Element, y: u32) -> Option<Self::Element>
fn sum<I: Iterator<Item = Self::Element>>(&self, iter: I) -> Self::Element
fn sum_refs<'b, I: Iterator<Item = &'b Self::Element> + 'b>( &self, iter: I, ) -> Self::Element
fn product<I: Iterator<Item = Self::Element>>(&self, iter: I) -> Self::Element
fn product_refs<'b, I: Iterator<Item = &'b Self::Element>>( &self, iter: I, ) -> Self::Element
§fn add_assign(&self, x: &mut Self::Element, y: &Self::Element)
fn add_assign(&self, x: &mut Self::Element, y: &Self::Element)
§fn sub_assign(&self, x: &mut Self::Element, y: &Self::Element)
fn sub_assign(&self, x: &mut Self::Element, y: &Self::Element)
§fn mul_assign(&self, x: &mut Self::Element, y: &Self::Element)
fn mul_assign(&self, x: &mut Self::Element, y: &Self::Element)
§fn pow_u32_assign(&self, x: &mut Self::Element, y: u32)
fn pow_u32_assign(&self, x: &mut Self::Element, y: u32)
Source§impl<'a, S: SemiringConfig, const DEGREE_PLUS_ONE: usize> SetConfig for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: SemiringConfig, const DEGREE_PLUS_ONE: usize> SetConfig for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
type Element = DensePolynomial<<S as SetConfig>::Element, DEGREE_PLUS_ONE>
impl<'a, S: Copy + SemiringConfig, const DEGREE_PLUS_ONE: usize> Copy for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: Eq + SemiringConfig, const DEGREE_PLUS_ONE: usize> Eq for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S: SemiringConfig, const DEGREE_PLUS_ONE: usize> StructuralPartialEq for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
Auto Trait Implementations§
impl<'a, S, const DEGREE_PLUS_ONE: usize> Freeze for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S, const DEGREE_PLUS_ONE: usize> RefUnwindSafe for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>where
S: RefUnwindSafe,
impl<'a, S, const DEGREE_PLUS_ONE: usize> Send for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S, const DEGREE_PLUS_ONE: usize> Sync for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S, const DEGREE_PLUS_ONE: usize> Unpin for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S, const DEGREE_PLUS_ONE: usize> UnsafeUnpin for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>
impl<'a, S, const DEGREE_PLUS_ONE: usize> UnwindSafe for DensePolynomialConfig<'a, S, DEGREE_PLUS_ONE>where
S: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> HasDensePolynomialConfig for Swhere
S: SemiringConfig,
impl<S> HasDensePolynomialConfig for Swhere
S: SemiringConfig,
fn dense_poly_cfg<const DEGREE_PLUS_ONE: usize>( &self, ) -> DensePolynomialConfig<'_, Self, DEGREE_PLUS_ONE>
Source§impl<S> HasDynamicPolynomialConfig for Swhere
S: SemiringConfig,
impl<S> HasDynamicPolynomialConfig for Swhere
S: SemiringConfig,
fn dyn_poly_cfg(&self) -> DynamicPolynomialConfig<'_, Self>
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>
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>
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