binius_math

Struct MLEEmbeddingAdapter

source
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,

source

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]>,

source§

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,

source§

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)

Performs copy-assignment from source. Read more
source§

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§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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]>,

source§

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,

source§

fn n_vars(&self) -> usize

Number of variables.
source§

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>

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>

Get the evaluations of the polynomial at a vertex of the hypercube and scale the value. Read more
source§

fn evaluate( &self, query: MultilinearQueryRef<'_, PE>, ) -> Result<PE::Scalar, Error>

source§

fn evaluate_partial_low( &self, query: MultilinearQueryRef<'_, PE>, ) -> Result<MultilinearExtension<PE>, Error>

source§

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>

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>

Get a subcube of the boolean hypercube of a given size. Read more
source§

fn underlier_data(&self) -> Option<&[u8]>

If available, returns underliers of the data of this multilinear as bytes.
source§

fn size(&self) -> usize

The number of coefficients required to specify the polynomial.
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,

source§

fn eq(&self, other: &MLEEmbeddingAdapter<P, PE, Data>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.6.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

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,

source§

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>

§

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>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more