pub struct EqIndPartialEval<F: Field> { /* private fields */ }
Expand description
Represents $\text{eq}(X, r)$, the partial evaluation of the equality indicator polynomial at a point $r$.
The $2 \mu$-variate multilinear polynomial $\text{eq}(X, Y)$ is defined as the multilinear extension of the map
$$ (x, y) \mapsto \begin{cases} 1 &\text{if } x = y \\ 0 &\text{if } x \ne y \end{cases}. $$
The polynomial can be efficiency computed with the following explicit formulation:
$$ \text{eq}(X, Y) = \prod_{i=0}^{\mu - 1} \left(X_i Y_i + (1 - X_i)(1 - Y_i)\right). $$
Implementations§
Source§impl<F: Field> EqIndPartialEval<F>
impl<F: Field> EqIndPartialEval<F>
pub fn new(r: impl Into<Vec<F>>) -> Self
pub fn n_vars(&self) -> usize
pub fn multilinear_extension<P: PackedField<Scalar = F>, Backend: ComputationBackend>( &self, backend: &Backend, ) -> Result<MultilinearExtension<P, Backend::Vec<P>>, Error>
Trait Implementations§
Source§impl<F: Clone + Field> Clone for EqIndPartialEval<F>
impl<F: Clone + Field> Clone for EqIndPartialEval<F>
Source§fn clone(&self) -> EqIndPartialEval<F>
fn clone(&self) -> EqIndPartialEval<F>
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 moreSource§impl<F: TowerField, P: PackedField<Scalar = F>> MultivariatePoly<P> for EqIndPartialEval<F>
impl<F: TowerField, P: PackedField<Scalar = F>> MultivariatePoly<P> for EqIndPartialEval<F>
Source§fn evaluate(&self, query: &[P]) -> Result<P, Error>
fn evaluate(&self, query: &[P]) -> Result<P, Error>
Evaluate the polynomial at a point in the extension field.
Source§fn binary_tower_level(&self) -> usize
fn binary_tower_level(&self) -> usize
Returns the maximum binary tower level of all constants in the arithmetic expression.
Source§fn erased_serialize(
&self,
write_buf: &mut dyn BufMut,
mode: SerializationMode,
) -> Result<(), SerializationError>
fn erased_serialize( &self, write_buf: &mut dyn BufMut, mode: SerializationMode, ) -> Result<(), SerializationError>
Serialize a type erased MultivariatePoly.
Since not every MultivariatePoly implements serialization, this defaults to returning an error.
Auto Trait Implementations§
impl<F> Freeze for EqIndPartialEval<F>
impl<F> RefUnwindSafe for EqIndPartialEval<F>
impl<F> Send for EqIndPartialEval<F>
impl<F> Sync for EqIndPartialEval<F>
impl<F> Unpin for EqIndPartialEval<F>
impl<F> UnwindSafe for EqIndPartialEval<F>
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