pub struct AffineVirtualSpec { /* private fields */ }Expand description
Declares an affine virtual binary-polynomial expression whose coefficients must be proved boolean.
The represented expression is
ones_coefficient * 1_D + sum_i coefficient_i * source_i[row + shift_i]where 1_D = 1 + X + ... + X^(D-1) is the all-ones bit polynomial for the
binary-poly cell width D. This covers the paper’s Ch/Maj lookup targets,
for example a + b + c - 2m and (1_D - e) + g - 2u.
Affine virtual specs are Q-side booleanity targets. They do not add entries
to the down row, and they are not committed columns.
Implementations§
Source§impl AffineVirtualSpec
impl AffineVirtualSpec
Sourcepub fn new(terms: Vec<AffineVirtualTerm>) -> Self
pub fn new(terms: Vec<AffineVirtualTerm>) -> Self
Construct an affine virtual expression with no 1_D offset.
Sourcepub fn with_ones_coefficient(
terms: Vec<AffineVirtualTerm>,
ones_coefficient: i64,
) -> Self
pub fn with_ones_coefficient( terms: Vec<AffineVirtualTerm>, ones_coefficient: i64, ) -> Self
Construct an affine virtual expression with a scalar multiple of
1_D as its constant bit-polynomial offset.
pub fn terms(&self) -> &[AffineVirtualTerm]
pub fn ones_coefficient(&self) -> i64
Trait Implementations§
Source§impl Clone for AffineVirtualSpec
impl Clone for AffineVirtualSpec
Source§fn clone(&self) -> AffineVirtualSpec
fn clone(&self) -> AffineVirtualSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AffineVirtualSpec
impl Debug for AffineVirtualSpec
Source§impl Hash for AffineVirtualSpec
impl Hash for AffineVirtualSpec
Source§impl PartialEq for AffineVirtualSpec
impl PartialEq for AffineVirtualSpec
Source§fn eq(&self, other: &AffineVirtualSpec) -> bool
fn eq(&self, other: &AffineVirtualSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for AffineVirtualSpec
impl StructuralPartialEq for AffineVirtualSpec
Auto Trait Implementations§
impl Freeze for AffineVirtualSpec
impl RefUnwindSafe for AffineVirtualSpec
impl Send for AffineVirtualSpec
impl Sync for AffineVirtualSpec
impl Unpin for AffineVirtualSpec
impl UnsafeUnpin for AffineVirtualSpec
impl UnwindSafe for AffineVirtualSpec
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§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