pub struct MultilinearComposite<P, C, M>where
P: PackedField,
M: MultilinearPoly<P>,{
pub composition: C,
pub multilinears: Vec<M>,
pub _marker: PhantomData<P>,
/* private fields */
}
Expand description
A polynomial defined as the composition of several multilinear polynomials.
A $\mu$-variate multilinear composite polynomial $p(X_0, …, X_{\mu})$ is defined as
$$ g(f_0(X_0, …, X_{\mu}), …, f_{k-1}(X_0, …, X_{\mu})) $$
where $g(Y_0, …, Y_{k-1})$ is a $k$-variate polynomial and $f_0, …, f_k$ are all multilinear in $\mu$ variables.
The BM
type parameter is necessary so that we can handle the case of a MultilinearComposite
that contains boxed trait objects, as well as the case where it directly holds some
implementation of MultilinearPoly
.
Fields§
§composition: C
§multilinears: Vec<M>
§_marker: PhantomData<P>
Implementations§
source§impl<P, C, M> MultilinearComposite<P, C, M>
impl<P, C, M> MultilinearComposite<P, C, M>
pub fn new( n_vars: usize, composition: C, multilinears: Vec<M>, ) -> Result<Self, Error>
pub fn evaluate<'a>( &self, query: impl Into<MultilinearQueryRef<'a, P>>, ) -> Result<P::Scalar, Error>
pub fn evaluate_on_hypercube(&self, index: usize) -> Result<P::Scalar, Error>
pub fn max_individual_degree(&self) -> usize
pub fn n_multilinears(&self) -> usize
source§impl<P, C, M> MultilinearComposite<P, C, M>
impl<P, C, M> MultilinearComposite<P, C, M>
pub fn to_arc_dyn_composition( self, ) -> MultilinearComposite<P, Arc<dyn CompositionPolyOS<P>>, M>
source§impl<P, C, M> MultilinearComposite<P, C, M>where
P: PackedField,
M: MultilinearPoly<P>,
impl<P, C, M> MultilinearComposite<P, C, M>where
P: PackedField,
M: MultilinearPoly<P>,
source§impl<P, C, M> MultilinearComposite<P, C, M>
impl<P, C, M> MultilinearComposite<P, C, M>
pub fn evaluate_partial_low( &self, query: MultilinearQueryRef<'_, P>, ) -> Result<MultilinearComposite<P, C, impl MultilinearPoly<P>>, Error>
Trait Implementations§
source§impl<P, C: Clone, M> Clone for MultilinearComposite<P, C, M>
impl<P, C: Clone, M> Clone for MultilinearComposite<P, C, M>
source§fn clone(&self) -> MultilinearComposite<P, C, M>
fn clone(&self) -> MultilinearComposite<P, C, M>
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, C: Debug, M> Debug for MultilinearComposite<P, C, M>
impl<P, C: Debug, M> Debug for MultilinearComposite<P, C, M>
Auto Trait Implementations§
impl<P, C, M> Freeze for MultilinearComposite<P, C, M>where
C: Freeze,
impl<P, C, M> RefUnwindSafe for MultilinearComposite<P, C, M>
impl<P, C, M> Send for MultilinearComposite<P, C, M>
impl<P, C, M> Sync for MultilinearComposite<P, C, M>
impl<P, C, M> Unpin for MultilinearComposite<P, C, M>
impl<P, C, M> UnwindSafe for MultilinearComposite<P, C, M>
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