EvalResult

Enum EvalResult 

Source
enum EvalResult<'a, F: FftField> {
    Constant(F),
    Evals {
        domain: Domain,
        evals: Evaluations<F, Radix2EvaluationDomain<F>>,
    },
    SubEvals {
        domain: Domain,
        shift: usize,
        evals: &'a Evaluations<F, Radix2EvaluationDomain<F>>,
    },
}

Variants§

§

Constant(F)

§

Evals

Fields

§domain: Domain
§evals: Evaluations<F, Radix2EvaluationDomain<F>>
§

SubEvals

SubEvals is used to refer to evaluations that can be trivially obtained from a borrowed evaluation. In this case, by taking a subset of the entries (specifically when the borrowed evals is over a superset of domain) and shifting them

Fields

§domain: Domain
§shift: usize
§evals: &'a Evaluations<F, Radix2EvaluationDomain<F>>

Implementations§

Source§

impl<'a, F: FftField> EvalResult<'a, F>

Implement algebraic methods like add, sub, mul, square, etc to use algebra on the type EvalResult.

Source

fn init_<G: Sync + Send + Fn(usize) -> F>( res_domain: (Domain, D<F>), g: G, ) -> Evaluations<F, D<F>>

Create an evaluation over the domain res_domain. The second parameter, g, is a function used to define the evaluations at a given point of the domain. For instance, the second parameter g can simply be the identity functions over a set of field elements. It can also be used to define polynomials like x^2 when we only have the value of x. It can be used in particular to evaluate an expression (a multi-variate polynomial) when we only do have access to the evaluations of the individual variables.

Source

fn init<G: Sync + Send + Fn(usize) -> F>( res_domain: (Domain, D<F>), g: G, ) -> Self

Call the internal function init_ and return the computed evaluation as a value Evals.

Source

fn add<'c>( self, other: EvalResult<'_, F>, res_domain: (Domain, D<F>), ) -> EvalResult<'c, F>

Source

fn sub<'c>( self, other: EvalResult<'_, F>, res_domain: (Domain, D<F>), ) -> EvalResult<'c, F>

Source

fn pow<'b>(self, d: u64, res_domain: (Domain, D<F>)) -> EvalResult<'b, F>

Source

fn square<'b>(self, res_domain: (Domain, D<F>)) -> EvalResult<'b, F>

Source

fn mul<'c>( self, other: EvalResult<'_, F>, res_domain: (Domain, D<F>), ) -> EvalResult<'c, F>

Trait Implementations§

Source§

impl<'a, F: Clone + FftField> Clone for EvalResult<'a, F>

Source§

fn clone(&self) -> EvalResult<'a, F>

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

Auto Trait Implementations§

§

impl<'a, F> Freeze for EvalResult<'a, F>
where F: Freeze,

§

impl<'a, F> RefUnwindSafe for EvalResult<'a, F>
where F: RefUnwindSafe,

§

impl<'a, F> Send for EvalResult<'a, F>

§

impl<'a, F> Sync for EvalResult<'a, F>

§

impl<'a, F> Unpin for EvalResult<'a, F>
where F: Unpin,

§

impl<'a, F> UnwindSafe for EvalResult<'a, F>

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.

§

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

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

§

fn vzip(self) -> V