pub struct MLEDirectAdapter<P, Data = Vec<P>>(/* private fields */)
where
P: PackedField,
Data: Deref<Target = [P]>;
Expand description
An adapter for MultilinearExtension
that implements MultilinearPoly
over the same
packed field that the MultilinearExtension
stores evaluations in.
Implementations§
source§impl<'a, P, Data> MLEDirectAdapter<P, Data>
impl<'a, P, Data> MLEDirectAdapter<P, Data>
pub fn upcast_arc_dyn(self) -> Arc<dyn MultilinearPoly<P> + Send + Sync + 'a>
sourcepub fn evaluate_zeroth_variable(
&self,
r: P::Scalar,
) -> Result<MultilinearExtension<P>, Error>
pub fn evaluate_zeroth_variable( &self, r: P::Scalar, ) -> Result<MultilinearExtension<P>, Error>
Given a ($mu$-variate) multilinear function $f$ and an element $r$, return the multilinear function $f(r, X_1, …, X_{\mu - 1})$.
Trait Implementations§
source§impl<P, Data> AsRef<MultilinearExtension<P, Data>> for MLEDirectAdapter<P, Data>
impl<P, Data> AsRef<MultilinearExtension<P, Data>> for MLEDirectAdapter<P, Data>
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, Data> Clone for MLEDirectAdapter<P, Data>
impl<P, Data> Clone for MLEDirectAdapter<P, Data>
source§fn clone(&self) -> MLEDirectAdapter<P, Data>
fn clone(&self) -> MLEDirectAdapter<P, 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, Data> Debug for MLEDirectAdapter<P, Data>
impl<P, Data> Debug for MLEDirectAdapter<P, Data>
source§impl<P, Data> From<MultilinearExtension<P, Data>> for MLEDirectAdapter<P, Data>
impl<P, Data> From<MultilinearExtension<P, Data>> for MLEDirectAdapter<P, Data>
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<F, P, Data> MultilinearPoly<P> for MLEDirectAdapter<P, Data>
impl<F, P, Data> MultilinearPoly<P> for MLEDirectAdapter<P, Data>
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<F, Error>
fn evaluate_on_hypercube(&self, index: usize) -> Result<F, 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: F,
) -> Result<F, Error>
fn evaluate_on_hypercube_and_scale( &self, index: usize, scalar: F, ) -> Result<F, Error>
Get the evaluations of the polynomial at a vertex of the hypercube and scale the value. Read more
fn evaluate(&self, query: MultilinearQueryRef<'_, P>) -> Result<F, Error>
fn evaluate_partial_low( &self, query: MultilinearQueryRef<'_, P>, ) -> Result<MultilinearExtension<P>, Error>
fn evaluate_partial_high( &self, query: MultilinearQueryRef<'_, P>, ) -> Result<MultilinearExtension<P>, Error>
source§fn subcube_inner_products(
&self,
query: MultilinearQueryRef<'_, P>,
subcube_vars: usize,
subcube_index: usize,
inner_products: &mut [P],
) -> Result<(), Error>
fn subcube_inner_products( &self, query: MultilinearQueryRef<'_, P>, subcube_vars: usize, subcube_index: usize, inner_products: &mut [P], ) -> 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 [P],
) -> Result<(), Error>
fn subcube_evals( &self, subcube_vars: usize, subcube_index: usize, log_embedding_degree: usize, evals: &mut [P], ) -> Result<(), Error>
Get a subcube of the boolean hypercube of a given size. Read more
source§impl<P, Data> PartialEq for MLEDirectAdapter<P, Data>
impl<P, Data> PartialEq for MLEDirectAdapter<P, Data>
impl<P, Data> Eq for MLEDirectAdapter<P, Data>
impl<P, Data> StructuralPartialEq for MLEDirectAdapter<P, Data>
Auto Trait Implementations§
impl<P, Data> Freeze for MLEDirectAdapter<P, Data>where
Data: Freeze,
impl<P, Data> RefUnwindSafe for MLEDirectAdapter<P, Data>where
Data: RefUnwindSafe,
impl<P, Data> Send for MLEDirectAdapter<P, Data>where
Data: Send,
impl<P, Data> Sync for MLEDirectAdapter<P, Data>where
Data: Sync,
impl<P, Data> Unpin for MLEDirectAdapter<P, Data>where
Data: Unpin,
impl<P, Data> UnwindSafe for MLEDirectAdapter<P, Data>where
Data: 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