p3_air

Trait AirBuilder

Source
pub trait AirBuilder: Sized {
    type F: Field;
    type Expr: AbstractField + From<Self::F> + Add<Self::Var, Output = Self::Expr> + Add<Self::F, Output = Self::Expr> + Sub<Self::Var, Output = Self::Expr> + Sub<Self::F, Output = Self::Expr> + Mul<Self::Var, Output = Self::Expr> + Mul<Self::F, Output = Self::Expr>;
    type Var: Into<Self::Expr> + Copy + Send + Sync + Add<Self::F, Output = Self::Expr> + Add<Self::Var, Output = Self::Expr> + Add<Self::Expr, Output = Self::Expr> + Sub<Self::F, Output = Self::Expr> + Sub<Self::Var, Output = Self::Expr> + Sub<Self::Expr, Output = Self::Expr> + Mul<Self::F, Output = Self::Expr> + Mul<Self::Var, Output = Self::Expr> + Mul<Self::Expr, Output = Self::Expr>;
    type M: Matrix<Self::Var>;

Show 15 methods // Required methods fn main(&self) -> Self::M; fn is_first_row(&self) -> Self::Expr; fn is_last_row(&self) -> Self::Expr; fn is_transition_window(&self, size: usize) -> Self::Expr; fn assert_zero<I: Into<Self::Expr>>(&mut self, x: I); // Provided methods fn is_transition(&self) -> Self::Expr { ... } fn when<I: Into<Self::Expr>>( &mut self, condition: I, ) -> FilteredAirBuilder<'_, Self> { ... } fn when_ne<I1: Into<Self::Expr>, I2: Into<Self::Expr>>( &mut self, x: I1, y: I2, ) -> FilteredAirBuilder<'_, Self> { ... } fn when_first_row(&mut self) -> FilteredAirBuilder<'_, Self> { ... } fn when_last_row(&mut self) -> FilteredAirBuilder<'_, Self> { ... } fn when_transition(&mut self) -> FilteredAirBuilder<'_, Self> { ... } fn when_transition_window( &mut self, size: usize, ) -> FilteredAirBuilder<'_, Self> { ... } fn assert_one<I: Into<Self::Expr>>(&mut self, x: I) { ... } fn assert_eq<I1: Into<Self::Expr>, I2: Into<Self::Expr>>( &mut self, x: I1, y: I2, ) { ... } fn assert_bool<I: Into<Self::Expr>>(&mut self, x: I) { ... }
}

Required Associated Types§

Source

type F: Field

Source

type Expr: AbstractField + From<Self::F> + Add<Self::Var, Output = Self::Expr> + Add<Self::F, Output = Self::Expr> + Sub<Self::Var, Output = Self::Expr> + Sub<Self::F, Output = Self::Expr> + Mul<Self::Var, Output = Self::Expr> + Mul<Self::F, Output = Self::Expr>

Source

type Var: Into<Self::Expr> + Copy + Send + Sync + Add<Self::F, Output = Self::Expr> + Add<Self::Var, Output = Self::Expr> + Add<Self::Expr, Output = Self::Expr> + Sub<Self::F, Output = Self::Expr> + Sub<Self::Var, Output = Self::Expr> + Sub<Self::Expr, Output = Self::Expr> + Mul<Self::F, Output = Self::Expr> + Mul<Self::Var, Output = Self::Expr> + Mul<Self::Expr, Output = Self::Expr>

Source

type M: Matrix<Self::Var>

Required Methods§

Source

fn main(&self) -> Self::M

Source

fn is_first_row(&self) -> Self::Expr

Source

fn is_last_row(&self) -> Self::Expr

Source

fn is_transition_window(&self, size: usize) -> Self::Expr

Source

fn assert_zero<I: Into<Self::Expr>>(&mut self, x: I)

Provided Methods§

Source

fn is_transition(&self) -> Self::Expr

Source

fn when<I: Into<Self::Expr>>( &mut self, condition: I, ) -> FilteredAirBuilder<'_, Self>

Returns a sub-builder whose constraints are enforced only when condition is nonzero.

Source

fn when_ne<I1: Into<Self::Expr>, I2: Into<Self::Expr>>( &mut self, x: I1, y: I2, ) -> FilteredAirBuilder<'_, Self>

Returns a sub-builder whose constraints are enforced only when x != y.

Source

fn when_first_row(&mut self) -> FilteredAirBuilder<'_, Self>

Returns a sub-builder whose constraints are enforced only on the first row.

Source

fn when_last_row(&mut self) -> FilteredAirBuilder<'_, Self>

Returns a sub-builder whose constraints are enforced only on the last row.

Source

fn when_transition(&mut self) -> FilteredAirBuilder<'_, Self>

Returns a sub-builder whose constraints are enforced on all rows except the last.

Source

fn when_transition_window( &mut self, size: usize, ) -> FilteredAirBuilder<'_, Self>

Returns a sub-builder whose constraints are enforced on all rows except the last size - 1.

Source

fn assert_one<I: Into<Self::Expr>>(&mut self, x: I)

Source

fn assert_eq<I1: Into<Self::Expr>, I2: Into<Self::Expr>>( &mut self, x: I1, y: I2, )

Source

fn assert_bool<I: Into<Self::Expr>>(&mut self, x: I)

Assert that x is a boolean, i.e. either 0 or 1.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, AB: AirBuilder> AirBuilder for FilteredAirBuilder<'a, AB>

Source§

type F = <AB as AirBuilder>::F

Source§

type Expr = <AB as AirBuilder>::Expr

Source§

type Var = <AB as AirBuilder>::Var

Source§

type M = <AB as AirBuilder>::M