pub enum ConstraintExpr<F> {
Cell(ProgramCell),
Const(F),
Add(ExprId, ExprId),
Mul(ExprId, ExprId),
Scale(F, ExprId),
Sum(Vec<ExprId>),
}Expand description
A single node in the constraint AST-DAG. All variants are algebraic operations over GF(2^128).
Variants§
Cell(ProgramCell)
A trace cell reference (column + current/next row).
Const(F)
A field constant.
Add(ExprId, ExprId)
Addition of two sub-expressions. In GF(2^N) this is XOR.
Mul(ExprId, ExprId)
Multiplication of two sub-expressions.
Scale(F, ExprId)
Scalar multiplication: coeff * expr.
Avoids creating a Const node + Mul pair for the common case.
Sum(Vec<ExprId>)
Sum of N sub-expressions. Exists specifically for Theta-style linear combinations to avoid deep Add chains. Evaluates to sum of children[i].
Trait Implementations§
Source§impl<F: Clone> Clone for ConstraintExpr<F>
impl<F: Clone> Clone for ConstraintExpr<F>
Source§fn clone(&self) -> ConstraintExpr<F>
fn clone(&self) -> ConstraintExpr<F>
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 moreAuto Trait Implementations§
impl<F> Freeze for ConstraintExpr<F>where
F: Freeze,
impl<F> RefUnwindSafe for ConstraintExpr<F>where
F: RefUnwindSafe,
impl<F> Send for ConstraintExpr<F>where
F: Send,
impl<F> Sync for ConstraintExpr<F>where
F: Sync,
impl<F> Unpin for ConstraintExpr<F>where
F: Unpin,
impl<F> UnsafeUnpin for ConstraintExpr<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for ConstraintExpr<F>where
F: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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