pub struct MLEEmbeddingAdapter<P, PE, Data = Vec<P>>(/* private fields */)
where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>;
Expand description
An adapter for MultilinearExtension
that implements MultilinearPoly
over a packed
extension field.
This struct implements MultilinearPoly
for an extension field of the base field that the
multilinear extension is defined over.
Implementations§
source§impl<'a, P, PE, Data> MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField,
PE: PackedField + RepackedExtension<P>,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Send + Sync + Debug + 'a,
impl<'a, P, PE, Data> MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField,
PE: PackedField + RepackedExtension<P>,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Send + Sync + Debug + 'a,
pub fn upcast_arc_dyn(self) -> Arc<dyn MultilinearPoly<PE> + Send + Sync + 'a>
Trait Implementations§
source§impl<P, PE, Data> AsRef<MultilinearExtension<P, Data>> for MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>,
impl<P, PE, Data> AsRef<MultilinearExtension<P, Data>> for MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>,
source§fn as_ref(&self) -> &MultilinearExtension<P, Data>
fn as_ref(&self) -> &MultilinearExtension<P, Data>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<P, PE, Data> Clone for MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField + Clone,
PE: PackedField + Clone,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Clone,
source§fn clone(&self) -> MLEEmbeddingAdapter<P, PE, Data>
fn clone(&self) -> MLEEmbeddingAdapter<P, PE, Data>
Returns a copy of the value. Read more
1.6.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 MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField + Debug,
PE: PackedField + Debug,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Debug,
source§impl<P, PE, Data> From<MultilinearExtension<P, Data>> for MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>,
impl<P, PE, Data> From<MultilinearExtension<P, Data>> for MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField,
PE: PackedField,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]>,
source§fn from(inner: MultilinearExtension<P, Data>) -> Self
fn from(inner: MultilinearExtension<P, Data>) -> Self
Converts to this type from the input type.
source§impl<P, PE, Data> MultilinearPoly<PE> for MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField + Debug,
PE: PackedField + RepackedExtension<P>,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Send + Sync + Debug,
impl<P, PE, Data> MultilinearPoly<PE> for MLEEmbeddingAdapter<P, PE, Data>where
P: PackedField + Debug,
PE: PackedField + RepackedExtension<P>,
PE::Scalar: ExtensionField<P::Scalar>,
Data: Deref<Target = [P]> + Send + Sync + Debug,
source§fn log_extension_degree(&self) -> usize
fn log_extension_degree(&self) -> usize
Binary logarithm of the extension degree (always exists because we only support power-of-two extension degrees)
source§fn evaluate_on_hypercube(&self, index: usize) -> Result<PE::Scalar, Error>
fn evaluate_on_hypercube(&self, index: usize) -> Result<PE::Scalar, Error>
Get the evaluations of the polynomial at a vertex of the hypercube. Read more
source§fn evaluate_on_hypercube_and_scale(
&self,
index: usize,
scalar: PE::Scalar,
) -> Result<PE::Scalar, Error>
fn evaluate_on_hypercube_and_scale( &self, index: usize, scalar: PE::Scalar, ) -> Result<PE::Scalar, Error>
Get the evaluations of the polynomial at a vertex of the hypercube and scale the value. Read more
fn evaluate( &self, query: MultilinearQueryRef<'_, PE>, ) -> Result<PE::Scalar, Error>
fn evaluate_partial_low( &self, query: MultilinearQueryRef<'_, PE>, ) -> Result<MultilinearExtension<PE>, Error>
fn evaluate_partial_high( &self, query: MultilinearQueryRef<'_, PE>, ) -> Result<MultilinearExtension<PE>, Error>
source§fn subcube_inner_products(
&self,
query: MultilinearQueryRef<'_, PE>,
subcube_vars: usize,
subcube_index: usize,
inner_products: &mut [PE],
) -> Result<(), Error>
fn subcube_inner_products( &self, query: MultilinearQueryRef<'_, PE>, subcube_vars: usize, subcube_index: usize, inner_products: &mut [PE], ) -> Result<(), Error>
Compute inner products of a multilinear query inside a subcube. Read more
source§fn subcube_evals(
&self,
subcube_vars: usize,
subcube_index: usize,
log_embedding_degree: usize,
evals: &mut [PE],
) -> Result<(), Error>
fn subcube_evals( &self, subcube_vars: usize, subcube_index: usize, log_embedding_degree: usize, evals: &mut [PE], ) -> Result<(), Error>
Get a subcube of the boolean hypercube of a given size. Read more
source§impl<P, PE, Data> PartialEq for MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<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: &MLEEmbeddingAdapter<P, PE, Data>) -> bool
fn eq(&self, other: &MLEEmbeddingAdapter<P, PE, Data>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<P, PE, Data> Eq for MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<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 MLEEmbeddingAdapter<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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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