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>> ArgumentEnv<F, T>

source

pub fn create( witness: ArgumentWitness<F>, coeffs: Vec<F>, constants: Constants<F>, challenges: Challenges<F> ) -> Self

Initialize the environment for creating constraints of real field elements that can be evaluated directly over the witness without the prover/verifier

source

pub fn witness(&self, row: CurrOrNext, col: usize) -> T

Witness cell (row, col)

source

pub fn witness_curr(&self, col: usize) -> T

Witness cell on current row

source

pub fn witness_next(&self, col: usize) -> T

Witness cell on next row

source

pub fn witness_curr_chunk(&self, from: usize, to: usize) -> Vec<T>

Witness cells in current row in an interval [from, to)

source

pub fn witness_next_chunk(&self, from: usize, to: usize) -> Vec<T>

Witness cells in next row in an interval [from, to)

source

pub fn coeff(&self, idx: usize) -> T

Coefficient value at index idx

source

pub fn coeff_chunk(&self, from: usize, to: usize) -> Vec<T>

Chunk of consecutive coefficients in an interval [from, to)

source

pub fn constant(&self, expr: ConstantExpr<F>) -> T

Constant value (see ConstantExpr for supported constants)

source

pub fn endo_coefficient(&self) -> T

Helper to access endomorphism coefficient constant

source

pub fn mds(&self, row: usize, col: usize) -> T

Helper to access maximum distance separable matrix constant at row, col

Trait Implementations§

source§

impl<F, T> Default for ArgumentEnv<F, T>

source§

fn default() -> Self

Initialize the environment for creating Expr constraints for use with prover/verifier

Auto Trait Implementations§

§

impl<F, T> RefUnwindSafe for ArgumentEnv<F, T>where F: RefUnwindSafe, T: RefUnwindSafe,

§

impl<F, T> Send for ArgumentEnv<F, T>where F: Send + Sync, T: Send,

§

impl<F, T> Sync for ArgumentEnv<F, T>where F: Sync, T: Sync,

§

impl<F, T> Unpin for ArgumentEnv<F, T>where F: Unpin, T: Unpin,

§

impl<F, T> UnwindSafe for ArgumentEnv<F, T>where F: UnwindSafe + RefUnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V