Struct binius_core::oracle::MultilinearOracleSet
source · pub struct MultilinearOracleSet<F: TowerField> { /* private fields */ }
Expand description
An ordered set of multilinear polynomial oracles.
The multilinear polynomial oracles form a directed acyclic graph, where each multilinear oracle
is either transparent, committed, or derived from one or more others. Each oracle is assigned a
unique OracleId
.
The oracle set also tracks the committed polynomial in batches where each batch is committed together with a polynomial commitment scheme.
Implementations§
source§impl<F: TowerField> MultilinearOracleSet<F>
impl<F: TowerField> MultilinearOracleSet<F>
pub fn new() -> Self
pub fn add(&mut self) -> MultilinearOracleSetAddition<'_, F>
pub fn add_named<S: ToString>( &mut self, s: S ) -> MultilinearOracleSetAddition<'_, F>
pub fn is_valid_oracle_id(&self, id: OracleId) -> bool
pub fn add_transparent( &mut self, poly: impl MultivariatePoly<F> + 'static ) -> Result<OracleId, Error>
pub fn add_committed_batch( &mut self, n_vars: usize, tower_level: usize ) -> BatchId
pub fn add_committed(&mut self, batch_id: BatchId) -> OracleId
pub fn add_committed_multiple<const N: usize>( &mut self, batch_id: BatchId ) -> [OracleId; N]
pub fn add_repeating( &mut self, id: OracleId, log_count: usize ) -> Result<OracleId, Error>
pub fn add_interleaved( &mut self, id0: OracleId, id1: OracleId ) -> Result<OracleId, Error>
pub fn add_merged( &mut self, id0: OracleId, id1: OracleId ) -> Result<OracleId, Error>
pub fn add_shifted( &mut self, id: OracleId, offset: usize, block_bits: usize, variant: ShiftVariant ) -> Result<OracleId, Error>
pub fn add_packed( &mut self, id: OracleId, log_degree: usize ) -> Result<OracleId, Error>
pub fn add_projected( &mut self, id: OracleId, values: Vec<F>, variant: ProjectionVariant ) -> Result<OracleId, Error>
pub fn add_linear_combination( &mut self, n_vars: usize, inner: impl IntoIterator<Item = (OracleId, F)> ) -> Result<OracleId, Error>
pub fn add_linear_combination_with_offset( &mut self, n_vars: usize, offset: F, inner: impl IntoIterator<Item = (OracleId, F)> ) -> Result<OracleId, Error>
pub fn add_zero_padded( &mut self, id: OracleId, n_vars: usize ) -> Result<OracleId, Error>
pub fn committed_batch(&self, id: BatchId) -> CommittedBatch
pub fn committed_batches(&self) -> Vec<CommittedBatch>
pub fn committed_oracle_id(&self, id: CommittedId) -> OracleId
pub fn committed_oracle_ids( &self, batch_id: BatchId ) -> impl Iterator<Item = OracleId>
pub fn committed_oracle(&self, id: CommittedId) -> MultilinearPolyOracle<F>
pub fn oracle(&self, id: OracleId) -> MultilinearPolyOracle<F>
pub fn n_vars(&self, id: OracleId) -> usize
sourcepub fn tower_level(&self, id: OracleId) -> usize
pub fn tower_level(&self, id: OracleId) -> usize
Maximum tower level of the oracle’s values over the boolean hypercube.
Trait Implementations§
source§impl<F: Clone + TowerField> Clone for MultilinearOracleSet<F>
impl<F: Clone + TowerField> Clone for MultilinearOracleSet<F>
source§fn clone(&self) -> MultilinearOracleSet<F>
fn clone(&self) -> MultilinearOracleSet<F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<F> Freeze for MultilinearOracleSet<F>where
F: BinaryField<Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F> + ExtensionField<BinaryField1b> + MulAssign<BinaryField1b> + SubAssign<BinaryField1b> + AddAssign<BinaryField1b> + Mul<BinaryField1b> + Sub<BinaryField1b> + Add<BinaryField1b> + TryInto<BinaryField1b> + From<BinaryField1b> + Field + WithUnderlier + Zeroable + InvertOrZero + Square + for<'a> MulAssign<&'a F> + for<'a> SubAssign<&'a F> + for<'a> AddAssign<&'a F> + MulAssign + SubAssign + AddAssign + for<'a> Product<&'a F> + for<'a> Sum<&'a F> + for<'a> Mul<&'a F> + for<'a> Sub<&'a F> + for<'a> Add<&'a F> + Product + Sum + Mul + Sub + Add + Neg + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + 'static,
<F as WithUnderlier>::Underlier: PackScalar<F> + UnderlierType + Sync + Send + Zeroable + NoUninit + Random + Copy + Clone + ConstantTimeEq + Eq + PartialEq + Default + Debug + Sized + 'static,
impl<F> !RefUnwindSafe for MultilinearOracleSet<F>
impl<F> Send for MultilinearOracleSet<F>where
F: BinaryField<Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F> + ExtensionField<BinaryField1b> + MulAssign<BinaryField1b> + SubAssign<BinaryField1b> + AddAssign<BinaryField1b> + Mul<BinaryField1b> + Sub<BinaryField1b> + Add<BinaryField1b> + TryInto<BinaryField1b> + From<BinaryField1b> + Field + WithUnderlier + Zeroable + InvertOrZero + Square + for<'a> MulAssign<&'a F> + for<'a> SubAssign<&'a F> + for<'a> AddAssign<&'a F> + MulAssign + SubAssign + AddAssign + for<'a> Product<&'a F> + for<'a> Sum<&'a F> + for<'a> Mul<&'a F> + for<'a> Sub<&'a F> + for<'a> Add<&'a F> + Product + Sum + Mul + Sub + Add + Neg + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + 'static,
<F as WithUnderlier>::Underlier: PackScalar<F> + UnderlierType + Sync + Send + Zeroable + NoUninit + Random + Copy + Clone + ConstantTimeEq + Eq + PartialEq + Default + Debug + Sized + 'static,
impl<F> Sync for MultilinearOracleSet<F>where
F: BinaryField<Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F> + ExtensionField<BinaryField1b> + MulAssign<BinaryField1b> + SubAssign<BinaryField1b> + AddAssign<BinaryField1b> + Mul<BinaryField1b> + Sub<BinaryField1b> + Add<BinaryField1b> + TryInto<BinaryField1b> + From<BinaryField1b> + Field + WithUnderlier + Zeroable + InvertOrZero + Square + for<'a> MulAssign<&'a F> + for<'a> SubAssign<&'a F> + for<'a> AddAssign<&'a F> + MulAssign + SubAssign + AddAssign + for<'a> Product<&'a F> + for<'a> Sum<&'a F> + for<'a> Mul<&'a F> + for<'a> Sub<&'a F> + for<'a> Add<&'a F> + Product + Sum + Mul + Sub + Add + Neg + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + 'static,
<F as WithUnderlier>::Underlier: PackScalar<F> + UnderlierType + Sync + Send + Zeroable + NoUninit + Random + Copy + Clone + ConstantTimeEq + Eq + PartialEq + Default + Debug + Sized + 'static,
impl<F> Unpin for MultilinearOracleSet<F>where
F: BinaryField<Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F, Output = F> + ExtensionField<BinaryField1b> + MulAssign<BinaryField1b> + SubAssign<BinaryField1b> + AddAssign<BinaryField1b> + Mul<BinaryField1b> + Sub<BinaryField1b> + Add<BinaryField1b> + TryInto<BinaryField1b> + From<BinaryField1b> + Field + WithUnderlier + Zeroable + InvertOrZero + Square + for<'a> MulAssign<&'a F> + for<'a> SubAssign<&'a F> + for<'a> AddAssign<&'a F> + MulAssign + SubAssign + AddAssign + for<'a> Product<&'a F> + for<'a> Sum<&'a F> + for<'a> Mul<&'a F> + for<'a> Sub<&'a F> + for<'a> Add<&'a F> + Product + Sum + Mul + Sub + Add + Neg + Debug + Sync + Send + Default + Clone + Copy + Eq + PartialEq + 'static + Unpin,
<F as WithUnderlier>::Underlier: PackScalar<F> + UnderlierType + Sync + Send + Zeroable + NoUninit + Random + Copy + Clone + ConstantTimeEq + Eq + PartialEq + Default + Debug + Sized + 'static,
impl<F> !UnwindSafe for MultilinearOracleSet<F>
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