pub struct MultilinearExtensionTransparent<P, PE, Data = Vec<P>>where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>,{ /* private fields */ }
Expand description
A transparent multilinear polynomial defined as the multilinear extension over a small hypercube.
Multilinear polynomials are considered transparent if they can be succinctly evaluated. While evaluation of multilinear extensions is generally exponential in the number of variables, when the number of variables is very small, and thus the evaluation hypercube is small, we can consider such a multilinear extension to be transparent.
Implementations§
Source§impl<P, PE, Data> MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>,
impl<P, PE, Data> MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>,
pub fn from_values(values: Data) -> Result<Self, Error>
Sourcepub fn from_values_and_mu(values: Data, n_vars: usize) -> Result<Self, Error>
pub fn from_values_and_mu(values: Data, n_vars: usize) -> Result<Self, Error>
Create a new MultilinearExtensionTransparent
from a set of values and a possibly smaller number of variables.
Trait Implementations§
Source§impl<P, PE, Data> Clone for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField + Clone,
PE: PackedField + Clone,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Clone,
impl<P, PE, Data> Clone for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField + Clone,
PE: PackedField + Clone,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Clone,
Source§fn clone(&self) -> MultilinearExtensionTransparent<P, PE, Data>
fn clone(&self) -> MultilinearExtensionTransparent<P, PE, Data>
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<P, PE, Data> Debug for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField + Debug,
PE: PackedField + Debug,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Debug,
impl<P, PE, Data> Debug for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField + Debug,
PE: PackedField + Debug,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Debug,
Source§impl<F, P, PE, Data> MultivariatePoly<F> for MultilinearExtensionTransparent<P, PE, Data>where
F: TowerField + ExtensionField<P::Scalar>,
P: PackedField,
PE: PackedField<Scalar = F> + RepackedExtension<P>,
Data: Deref<Target = [P]> + Send + Sync + Debug,
impl<F, P, PE, Data> MultivariatePoly<F> for MultilinearExtensionTransparent<P, PE, Data>where
F: TowerField + ExtensionField<P::Scalar>,
P: PackedField,
PE: PackedField<Scalar = F> + RepackedExtension<P>,
Data: Deref<Target = [P]> + Send + Sync + Debug,
Source§fn evaluate(&self, query: &[F]) -> Result<F, Error>
fn evaluate(&self, query: &[F]) -> Result<F, 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.
Source§impl<P, PE, Data> PartialEq for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField + PartialEq,
PE: PackedField + PartialEq,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + PartialEq,
impl<P, PE, Data> PartialEq for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField + PartialEq,
PE: PackedField + PartialEq,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + PartialEq,
Source§fn eq(&self, other: &MultilinearExtensionTransparent<P, PE, Data>) -> bool
fn eq(&self, other: &MultilinearExtensionTransparent<P, PE, Data>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<P, PE, Data> SerializeBytes for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField,
PE: RepackedExtension<P>,
PE::Scalar: TowerField + ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Debug + Send + Sync,
impl<P, PE, Data> SerializeBytes for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField,
PE: RepackedExtension<P>,
PE::Scalar: TowerField + ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Debug + Send + Sync,
fn serialize( &self, write_buf: impl BufMut, mode: SerializationMode, ) -> Result<(), SerializationError>
impl<P, PE, Data> Eq for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField + Eq,
PE: PackedField + Eq,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Eq,
impl<P, PE, Data> StructuralPartialEq for MultilinearExtensionTransparent<P, PE, Data>where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>,
Auto Trait Implementations§
impl<P, PE, Data> Freeze for MultilinearExtensionTransparent<P, PE, Data>where
<PE as PackedField>::Scalar: Sized,
<<PE as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
Data: Freeze,
impl<P, PE, Data> RefUnwindSafe for MultilinearExtensionTransparent<P, PE, Data>where
<PE as PackedField>::Scalar: Sized,
<<PE as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
Data: RefUnwindSafe,
PE: RefUnwindSafe,
impl<P, PE, Data> Send for MultilinearExtensionTransparent<P, PE, Data>where
<PE as PackedField>::Scalar: Sized,
<<PE as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
Data: Send,
impl<P, PE, Data> Sync for MultilinearExtensionTransparent<P, PE, Data>where
<PE as PackedField>::Scalar: Sized,
<<PE as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
Data: Sync,
impl<P, PE, Data> Unpin for MultilinearExtensionTransparent<P, PE, Data>where
<PE as PackedField>::Scalar: Sized,
<<PE as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
Data: Unpin,
PE: Unpin,
impl<P, PE, Data> UnwindSafe for MultilinearExtensionTransparent<P, PE, Data>where
<PE as PackedField>::Scalar: Sized,
<<PE as PackedField>::Scalar as WithUnderlier>::Underlier: Sized,
Data: UnwindSafe,
PE: 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