binius_core::polynomial::mle_adapters

Struct MLEDirectAdapter

source
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>
where P: PackedField, Data: Deref<Target = [P]> + Send + Sync + Debug + 'a,

source

pub fn upcast_arc_dyn(self) -> Arc<dyn MultilinearPoly<P> + Send + Sync + 'a>

Trait Implementations§

source§

impl<P, Data> AsRef<MultilinearExtension<P, Data>> for MLEDirectAdapter<P, Data>
where P: PackedField, 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, Data> Clone for MLEDirectAdapter<P, Data>
where P: PackedField + Clone, Data: Deref<Target = [P]> + Clone,

source§

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)

Performs copy-assignment from source. Read more
source§

impl<P, Data> Debug for MLEDirectAdapter<P, Data>
where P: PackedField + Debug, 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, Data> From<MultilinearExtension<P, Data>> for MLEDirectAdapter<P, Data>
where P: PackedField, Data: Deref<Target = [P]>,

source§

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>
where F: Field, P: PackedField<Scalar = F> + Debug, 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<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>

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

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

source§

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

source§

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>

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>

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, Data> PartialEq for MLEDirectAdapter<P, Data>
where P: PackedField + PartialEq, Data: Deref<Target = [P]> + PartialEq,

source§

fn eq(&self, other: &MLEDirectAdapter<P, 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, Data> Eq for MLEDirectAdapter<P, Data>
where P: PackedField + Eq, Data: Deref<Target = [P]> + Eq,

source§

impl<P, Data> StructuralPartialEq for MLEDirectAdapter<P, Data>
where P: PackedField, Data: Deref<Target = [P]>,

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