Struct kimchi::circuits::argument::ArgumentEnv
source · pub struct ArgumentEnv<F: 'static, T> { /* private fields */ }
Expand description
The argument environment is used to specify how the argument’s constraints are
represented when they are built. If the environment is created without ArgumentData
and with F = Expr<F>
, then the constraints are built as Expr expressions (e.g. for
use with the prover/verifier). On the other hand, if the environment is
created with ArgumentData and F = Field or F = PrimeField, then the constraints
are built as expressions of real field elements and can be evaluated directly on
the witness without using the prover.
Implementations§
source§impl<F: Field, T: ExprOps<F, BerkeleyChallengeTerm>> ArgumentEnv<F, T>
impl<F: Field, T: ExprOps<F, BerkeleyChallengeTerm>> ArgumentEnv<F, T>
sourcepub fn create(
witness: ArgumentWitness<F>,
coeffs: Vec<F>,
constants: Constants<F>,
challenges: BerkeleyChallenges<F>
) -> Self
pub fn create( witness: ArgumentWitness<F>, coeffs: Vec<F>, constants: Constants<F>, challenges: BerkeleyChallenges<F> ) -> Self
Initialize the environment for creating constraints of real field elements that can be evaluated directly over the witness without the prover/verifier
sourcepub fn witness(&self, row: CurrOrNext, col: usize) -> T
pub fn witness(&self, row: CurrOrNext, col: usize) -> T
Witness cell (row, col)
sourcepub fn witness_curr(&self, col: usize) -> T
pub fn witness_curr(&self, col: usize) -> T
Witness cell on current row
sourcepub fn witness_next(&self, col: usize) -> T
pub fn witness_next(&self, col: usize) -> T
Witness cell on next row
sourcepub fn witness_curr_chunk(&self, from: usize, to: usize) -> Vec<T>
pub fn witness_curr_chunk(&self, from: usize, to: usize) -> Vec<T>
Witness cells in current row in an interval [from, to)
sourcepub fn witness_next_chunk(&self, from: usize, to: usize) -> Vec<T>
pub fn witness_next_chunk(&self, from: usize, to: usize) -> Vec<T>
Witness cells in next row in an interval [from, to)
sourcepub fn coeff_chunk(&self, from: usize, to: usize) -> Vec<T>
pub fn coeff_chunk(&self, from: usize, to: usize) -> Vec<T>
Chunk of consecutive coefficients in an interval [from, to)
sourcepub fn constant(&self, expr: ConstantExpr<F, BerkeleyChallengeTerm>) -> T
pub fn constant(&self, expr: ConstantExpr<F, BerkeleyChallengeTerm>) -> T
Constant value (see ConstantExpr for supported constants)
sourcepub fn endo_coefficient(&self) -> T
pub fn endo_coefficient(&self) -> T
Helper to access endomorphism coefficient constant