Struct Polynomial

Source
pub struct Polynomial<F: Field, N: ArrayLength<F> + Add<B1>>(/* private fields */)
where
    Add1<N>: ArrayLength<F>;

Implementations§

Source§

impl<F: Field, N: ArrayLength<F> + Add<B1>> Polynomial<F, N>
where Add1<N>: ArrayLength<F>,

Source

pub fn deg(&self) -> usize

Source

pub fn leading_coefficient(&self) -> F

Trait Implementations§

Source§

impl<F: Field, N: ArrayLength<F> + Add<B1> + Max<M>, M: ArrayLength<F> + Add<B1>> Add<Polynomial<F, M>> for Polynomial<F, N>
where Add1<N>: ArrayLength<F>, Add1<M>: ArrayLength<F>, Maximum<N, M>: ArrayLength<F> + Add<B1>, Add1<Maximum<N, M>>: ArrayLength<F>,

Source§

type Output = Polynomial<F, <N as Max<M>>::Output>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Polynomial<F, M>) -> Self::Output

Performs the + operation. Read more
Source§

impl<F: Clone + Field, N: Clone + ArrayLength<F> + Add<B1>> Clone for Polynomial<F, N>
where Add1<N>: ArrayLength<F>,

Source§

fn clone(&self) -> Polynomial<F, N>

Returns a copy 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<F: Debug + Field, N: Debug + ArrayLength<F> + Add<B1>> Debug for Polynomial<F, N>
where Add1<N>: ArrayLength<F>,

Source§

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

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

impl<F: Default + Field, N: Default + ArrayLength<F> + Add<B1>> Default for Polynomial<F, N>
where Add1<N>: ArrayLength<F>,

Source§

fn default() -> Polynomial<F, N>

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

impl<F: Field + PartialEq, N: ArrayLength<F> + Add<B1> + Sub<M> + Max<Sum<Diff<N, M>, M>, Output = N>, M: ArrayLength<F> + Add<B1>> Div<Polynomial<F, M>> for Polynomial<F, N>
where Add1<N>: ArrayLength<F>, Add1<M>: ArrayLength<F>, Diff<N, M>: ArrayLength<F> + Add<B1> + Add<M> + Max<Output = Diff<N, M>> + Add<Diff<N, M>>, Add1<Diff<N, M>>: ArrayLength<F>, Sum<Diff<N, M>, M>: ArrayLength<F> + Add<B1>, Add1<Sum<Diff<N, M>, M>>: ArrayLength<F>, Maximum<N, Sum<Diff<N, M>, M>>: ArrayLength<F> + Add<B1>, Add1<Maximum<N, Sum<Diff<N, M>, M>>>: ArrayLength<F>,

Source§

type Output = Result<Polynomial<F, <N as Sub<M>>::Output>, ()>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Polynomial<F, M>) -> Self::Output

Performs the / operation. Read more
Source§

impl<F: Field, N: ArrayLength<F> + Add<B1>> From<GenericArray<F, <N as Add<B1>>::Output>> for Polynomial<F, N>
where Add1<N>: ArrayLength<F>,

Source§

fn from(original: GenericArray<F, Add1<N>>) -> Polynomial<F, N>

Converts to this type from the input type.
Source§

impl<F: Field, N: ArrayLength<F> + Add<M> + Add<B1>, M: ArrayLength<F> + Add<B1>> Mul<Polynomial<F, M>> for Polynomial<F, N>
where Add1<N>: ArrayLength<F>, Add1<M>: ArrayLength<F>, Sum<N, M>: ArrayLength<F> + Add<B1>, Add1<Sum<N, M>>: ArrayLength<F>,

Source§

type Output = Polynomial<F, <N as Add<M>>::Output>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Polynomial<F, M>) -> Self::Output

Performs the * operation. Read more
Source§

impl<F: Field, N: ArrayLength<F> + Add<B1>> Neg for Polynomial<F, N>
where Add1<N>: ArrayLength<F>,

Source§

type Output = Polynomial<F, N>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<F: PartialEq + Field, N: PartialEq + ArrayLength<F> + Add<B1>> PartialEq for Polynomial<F, N>
where Add1<N>: ArrayLength<F>,

Source§

fn eq(&self, other: &Polynomial<F, N>) -> 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<F: Field, N: ArrayLength<F> + Add<B1> + Max<M>, M: ArrayLength<F> + Add<B1>> Sub<Polynomial<F, M>> for Polynomial<F, N>
where Add1<N>: ArrayLength<F>, Add1<M>: ArrayLength<F>, Maximum<N, M>: ArrayLength<F> + Add<B1>, Add1<Maximum<N, M>>: ArrayLength<F>,

Source§

type Output = Polynomial<F, <N as Max<M>>::Output>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Polynomial<F, M>) -> Self::Output

Performs the - operation. Read more
Source§

impl<F: Field, N: ArrayLength<F> + Add<B1>> StructuralPartialEq for Polynomial<F, N>
where Add1<N>: ArrayLength<F>,

Auto Trait Implementations§

§

impl<F, N> Freeze for Polynomial<F, N>
where <N as Add<B1>>::Output: Sized, <<N as Add<B1>>::Output as ArrayLength<F>>::ArrayType: Freeze,

§

impl<F, N> RefUnwindSafe for Polynomial<F, N>
where <N as Add<B1>>::Output: Sized, <<N as Add<B1>>::Output as ArrayLength<F>>::ArrayType: RefUnwindSafe,

§

impl<F, N> Send for Polynomial<F, N>
where <N as Add<B1>>::Output: Sized, F: Send,

§

impl<F, N> Sync for Polynomial<F, N>
where <N as Add<B1>>::Output: Sized, F: Sync,

§

impl<F, N> Unpin for Polynomial<F, N>
where <N as Add<B1>>::Output: Sized, <<N as Add<B1>>::Output as ArrayLength<F>>::ArrayType: Unpin,

§

impl<F, N> UnwindSafe for Polynomial<F, N>
where <N as Add<B1>>::Output: Sized, <<N as Add<B1>>::Output as ArrayLength<F>>::ArrayType: UnwindSafe,

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> 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> Same for T

Source§

type Output = T

Should always be 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, 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.