pub struct GrandProductWitness<PW: PackedField> { /* private fields */ }
Implementations§
Source§impl<PW: PackedField> GrandProductWitness<PW>
impl<PW: PackedField> GrandProductWitness<PW>
pub fn new(poly: MultilinearWitness<'_, PW>) -> Result<Self, Error>
Sourcepub fn n_vars(&self) -> usize
pub fn n_vars(&self) -> usize
Returns the base-two log of the number of inputs to the GKR grand product circuit
Sourcepub fn grand_product_evaluation(&self) -> PW::Scalar
pub fn grand_product_evaluation(&self) -> PW::Scalar
Returns the evaluation of the GKR grand product circuit
pub fn ith_layer_evals(&self, i: usize) -> Result<&'_ [PW], Error>
Sourcepub fn ith_layer_eval_halves(
&self,
i: usize,
) -> Result<(PackedFieldStorage<'_, PW>, PackedFieldStorage<'_, PW>), Error>
pub fn ith_layer_eval_halves( &self, i: usize, ) -> Result<(PackedFieldStorage<'_, PW>, PackedFieldStorage<'_, PW>), Error>
Returns the evaluations of the ith layer of the GKR grand product circuit, split into two halves REQUIRES: 0 <= i < n_vars
Trait Implementations§
Source§impl<PW: Clone + PackedField> Clone for GrandProductWitness<PW>
impl<PW: Clone + PackedField> Clone for GrandProductWitness<PW>
Source§fn clone(&self) -> GrandProductWitness<PW>
fn clone(&self) -> GrandProductWitness<PW>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<PW> Freeze for GrandProductWitness<PW>
impl<PW> RefUnwindSafe for GrandProductWitness<PW>where
PW: RefUnwindSafe,
impl<PW> Send for GrandProductWitness<PW>
impl<PW> Sync for GrandProductWitness<PW>
impl<PW> Unpin for GrandProductWitness<PW>where
PW: Unpin,
impl<PW> UnwindSafe for GrandProductWitness<PW>where
PW: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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> ⓘ
Converts
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> ⓘ
Converts
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