Trait bellman::ConstraintSystem [] [src]

pub trait ConstraintSystem<E: Engine> {
    fn alloc<NR, N, F>(&mut self, name_fn: N, f: F) -> Result<Variable, Error>
    where
        NR: Into<String>,
        N: FnOnce() -> NR,
        F: FnOnce() -> Result<E::Fr, Error>
;
fn enforce<NR: Into<String>, N: FnOnce() -> NR>(
        &mut self,
        name_fn: N,
        a: LinearCombination<E>,
        b: LinearCombination<E>,
        c: LinearCombination<E>
    ); fn one() -> Variable { ... }
fn namespace<NR, N, R, F>(&mut self, _: N, space_fn: F) -> Result<R, Error>
    where
        NR: Into<String>,
        N: FnOnce() -> NR,
        F: FnOnce(&mut Self) -> Result<R, Error>
, { ... } }

Required Methods

Allocate a private variable in the constraint system. The provided function is used to determine the assignment of the variable.

Enforce that A * B = C.

Provided Methods

Return the "one" input variable

Begin a namespace for the constraint system

Implementors