Trait kimchi_msm::circuit_design::capabilities::ColAccessCap
source · pub trait ColAccessCap<F: PrimeField, CIx: ColumnIndexer> {
type Variable: Clone + Add<Self::Variable, Output = Self::Variable> + Sub<Self::Variable, Output = Self::Variable> + Mul<Self::Variable, Output = Self::Variable> + Neg<Output = Self::Variable> + From<u64> + Debug + 'static;
// Required methods
fn assert_zero(&mut self, cst: Self::Variable);
fn set_assert_mapper(
&mut self,
mapper: Box<dyn Fn(Self::Variable) -> Self::Variable>
);
fn read_column(&self, col: CIx) -> Self::Variable;
fn constant(value: F) -> Self::Variable;
}
Expand description
Environment capability for accessing and reading columns. This is necessary for building constraints.
Required Associated Types§
type Variable: Clone + Add<Self::Variable, Output = Self::Variable> + Sub<Self::Variable, Output = Self::Variable> + Mul<Self::Variable, Output = Self::Variable> + Neg<Output = Self::Variable> + From<u64> + Debug + 'static
Required Methods§
sourcefn assert_zero(&mut self, cst: Self::Variable)
fn assert_zero(&mut self, cst: Self::Variable)
Asserts that the value is zero.
sourcefn set_assert_mapper(
&mut self,
mapper: Box<dyn Fn(Self::Variable) -> Self::Variable>
)
fn set_assert_mapper( &mut self, mapper: Box<dyn Fn(Self::Variable) -> Self::Variable> )
Sets an assert predicate f(X)
such that when assert_zero is
called on x, it will actually perform assert_zero(f(x))
.
sourcefn read_column(&self, col: CIx) -> Self::Variable
fn read_column(&self, col: CIx) -> Self::Variable
Reads value from a column position.