ScaledChunkedPolynomial

Struct ScaledChunkedPolynomial 

Source
struct ScaledChunkedPolynomial<F, P>(Vec<(F, P)>);
Expand description

A formal sum of the form s_0 * p_0 + ... s_n * p_n where each s_i is a scalar and each p_i is a polynomial. The parameter P is expected to be the coefficients of the polynomial p_i, even though we could treat it as the evaluations.

This hypothesis is important if to_dense_polynomial is called.

Tuple Fields§

§0: Vec<(F, P)>

Implementations§

Source§

impl<F, P> ScaledChunkedPolynomial<F, P>

Source

fn add_poly(&mut self, scale: F, p: P)

Source§

impl<F: Field> ScaledChunkedPolynomial<F, &[F]>

Source

fn to_dense_polynomial(&self) -> DensePolynomial<F>

Compute the resulting scaled polynomial. Example: Given the two polynomials 1 + 2X and 3 + 4X, and the scaling factors 2 and 3, the result is the polynomial 11 + 16X.

2 * [1, 2] + 3 * [3, 4] = [2, 4] + [9, 12] = [11, 16]

Trait Implementations§

Source§

impl<F: Default, P: Default> Default for ScaledChunkedPolynomial<F, P>

Source§

fn default() -> ScaledChunkedPolynomial<F, P>

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

Auto Trait Implementations§

§

impl<F, P> Freeze for ScaledChunkedPolynomial<F, P>

§

impl<F, P> RefUnwindSafe for ScaledChunkedPolynomial<F, P>

§

impl<F, P> Send for ScaledChunkedPolynomial<F, P>
where F: Send, P: Send,

§

impl<F, P> Sync for ScaledChunkedPolynomial<F, P>
where F: Sync, P: Sync,

§

impl<F, P> Unpin for ScaledChunkedPolynomial<F, P>
where F: Unpin, P: Unpin,

§

impl<F, P> UnwindSafe for ScaledChunkedPolynomial<F, P>
where F: UnwindSafe, P: 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> 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.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V