pub struct MultilinearExtensionIndex<'a, U, FW>{ /* private fields */ }
Expand description
Data structure that indexes multilinear extensions by oracle ID.
A crate::oracle::MultilinearOracleSet
indexes multilinear polynomial oracles by assigning
unique, sequential oracle IDs. The caller can get the MultilinearExtension
defined natively
over a subfield. This is possible because the MultilinearExtensionIndex::get
method is
generic over the subfield type and the struct itself only stores the underlying data.
Implementations§
source§impl<'a, U, FW> MultilinearExtensionIndex<'a, U, FW>
impl<'a, U, FW> MultilinearExtensionIndex<'a, U, FW>
pub fn new() -> Self
pub fn get<FS>( &self, id: OracleId, ) -> Result<MultilinearExtensionBorrowed<'_, PackedType<U, FS>>, Error>
pub fn get_multilin_poly( &self, id: OracleId, ) -> Result<MultilinearWitness<'a, PackedType<U, FW>>, Error>
pub fn update_owned<FS, Data>( self, witnesses: impl IntoIterator<Item = (OracleId, Data)>, ) -> Result<MultilinearExtensionIndex<'a, U, FW>, Error>
pub fn update_borrowed<'new, FS>( self, witnesses: impl IntoIterator<Item = (OracleId, &'new [U])>, ) -> Result<MultilinearExtensionIndex<'new, U, FW>, Error>
pub fn update_multilin_poly( &mut self, witnesses: impl IntoIterator<Item = (OracleId, MultilinearWitness<'a, PackedType<U, FW>>)>, ) -> Result<(), Error>
pub fn update_packed<'new, FS>( self, witnesses: impl IntoIterator<Item = (OracleId, &'new [PackedType<U, FS>])>, ) -> Result<MultilinearExtensionIndex<'new, U, FW>, Error>
Trait Implementations§
source§impl<'a, U, FW> Debug for MultilinearExtensionIndex<'a, U, FW>
impl<'a, U, FW> Debug for MultilinearExtensionIndex<'a, U, FW>
source§impl<'a, U, FW> Default for MultilinearExtensionIndex<'a, U, FW>
impl<'a, U, FW> Default for MultilinearExtensionIndex<'a, U, FW>
source§fn default() -> MultilinearExtensionIndex<'a, U, FW>
fn default() -> MultilinearExtensionIndex<'a, U, FW>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a, U, FW> Freeze for MultilinearExtensionIndex<'a, U, FW>
impl<'a, U, FW> !RefUnwindSafe for MultilinearExtensionIndex<'a, U, FW>
impl<'a, U, FW> Send for MultilinearExtensionIndex<'a, U, FW>
impl<'a, U, FW> Sync for MultilinearExtensionIndex<'a, U, FW>
impl<'a, U, FW> Unpin for MultilinearExtensionIndex<'a, U, FW>
impl<'a, U, FW> !UnwindSafe for MultilinearExtensionIndex<'a, U, FW>
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
§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