pub struct ConstraintDegreeCollector {
pub q_degrees: Vec<usize>,
pub fq_degrees: Vec<Vec<usize>>,
}Expand description
Collects the degree of each constraint in a UAIR by implementing the
ConstraintBuilder trait.
Fields§
§q_degrees: Vec<usize>§fq_degrees: Vec<Vec<usize>>Trait Implementations§
Source§impl ConstraintBuilder for ConstraintDegreeCollector
impl ConstraintBuilder for ConstraintDegreeCollector
Source§type Expr = DegreeCountingSemiring
type Expr = DegreeCountingSemiring
The expressions the constraint builder operates on.
It is opaque from the PoV of an AIR: arithmetic operations on it are
provided by the expression config passed to
Uair::constrain_general alongside the builder.Source§type Ideal = ImpossibleIdeal
type Ideal = ImpossibleIdeal
The type of ideals used by the constraint builder.
Source§type FqIdeal = ImpossibleIdeal
type FqIdeal = ImpossibleIdeal
Ideals living over $F_{q_i}[X]$ for the prime tuple declared by
the surrounding
UairSignature::primes. A single
ConstraintBuilder shares one runtime type for all primes; the prime
index is passed at the call site via
ConstraintBuilder::assert_in_fq_ideal. Builders that don’t care
about $F_q[X]$-constraints (counters, collectors, etc.) set
this to ImpossibleIdeal.Source§fn assert_in_ideal(&mut self, expr: Self::Expr, _ideal: &Self::Ideal)
fn assert_in_ideal(&mut self, expr: Self::Expr, _ideal: &Self::Ideal)
Add a constraint saying that
expr belongs to the ideal ideal.Source§fn assert_zero(&mut self, expr: Self::Expr)
fn assert_zero(&mut self, expr: Self::Expr)
Add a constraint saying that
expr is equal to zero which is
the same as saying that expr belongs to the zero ideal.Source§impl Debug for ConstraintDegreeCollector
impl Debug for ConstraintDegreeCollector
Source§impl Default for ConstraintDegreeCollector
impl Default for ConstraintDegreeCollector
Source§fn default() -> ConstraintDegreeCollector
fn default() -> ConstraintDegreeCollector
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConstraintDegreeCollector
impl RefUnwindSafe for ConstraintDegreeCollector
impl Send for ConstraintDegreeCollector
impl Sync for ConstraintDegreeCollector
impl Unpin for ConstraintDegreeCollector
impl UnsafeUnpin for ConstraintDegreeCollector
impl UnwindSafe for ConstraintDegreeCollector
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> 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