pub struct ConstraintSystem {
pub variables: Vec<Variable>,
pub constraints: Vec<Constraint>,
pub num_public_inputs: usize,
pub public_input_indices: Vec<usize>,
}Expand description
A constraint system accumulating R1CS constraints.
Fields§
§variables: Vec<Variable>All allocated variables.
constraints: Vec<Constraint>All constraints.
num_public_inputs: usizeNumber of public input variables.
public_input_indices: Vec<usize>Indices of public input variables.
Implementations§
Source§impl ConstraintSystem
impl ConstraintSystem
Sourcepub fn num_variables(&self) -> usize
pub fn num_variables(&self) -> usize
Number of variables.
Sourcepub fn num_constraints(&self) -> usize
pub fn num_constraints(&self) -> usize
Number of constraints.
Sourcepub fn is_satisfied(&self) -> bool
pub fn is_satisfied(&self) -> bool
Check if all constraints are satisfied by the current variable assignments.
Trait Implementations§
Source§impl Clone for ConstraintSystem
impl Clone for ConstraintSystem
Source§fn clone(&self) -> ConstraintSystem
fn clone(&self) -> ConstraintSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConstraintSystem
impl Debug for ConstraintSystem
Auto Trait Implementations§
impl Freeze for ConstraintSystem
impl RefUnwindSafe for ConstraintSystem
impl Send for ConstraintSystem
impl Sync for ConstraintSystem
impl Unpin for ConstraintSystem
impl UnsafeUnpin for ConstraintSystem
impl UnwindSafe for ConstraintSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more