pub struct R1CS<F: PrimeField> { /* private fields */ }
Implementations§
Source§impl<F: PrimeField> R1CS<F>
impl<F: PrimeField> R1CS<F>
Sourcepub fn is_satisfied(&self) -> bool
pub fn is_satisfied(&self) -> bool
Returns true
if all of the constraints are satisfied.
In addition, when in debug mode, this function also checks that all constraints use variables corresponding to the declared variables.
Sourcepub fn num_constants(&self) -> u64
pub fn num_constants(&self) -> u64
Returns the number of constants in the constraint system.
Sourcepub fn num_public(&self) -> u64
pub fn num_public(&self) -> u64
Returns the number of public variables in the constraint system.
Sourcepub fn num_private(&self) -> u64
pub fn num_private(&self) -> u64
Returns the number of private variables in the constraint system.
Sourcepub fn num_variables(&self) -> u64
pub fn num_variables(&self) -> u64
Returns the number of constant, public, and private variables in the constraint system.
Sourcepub fn num_constraints(&self) -> u64
pub fn num_constraints(&self) -> u64
Returns the number of constraints in the constraint system.
Sourcepub fn num_nonzeros(&self) -> (u64, u64, u64)
pub fn num_nonzeros(&self) -> (u64, u64, u64)
Returns the number of nonzeros in the constraint system.
Sourcepub fn to_public_variables(&self) -> &Vec<Variable<F>>
pub fn to_public_variables(&self) -> &Vec<Variable<F>>
Returns the public variables in the constraint system.
Sourcepub fn to_private_variables(&self) -> &Vec<Variable<F>>
pub fn to_private_variables(&self) -> &Vec<Variable<F>>
Returns the private variables in the constraint system.
Sourcepub fn to_constraints(&self) -> &Vec<Rc<Constraint<F>>>
pub fn to_constraints(&self) -> &Vec<Rc<Constraint<F>>>
Returns the constraints in the constraint system.
Trait Implementations§
Source§impl<F: PrimeField> Display for R1CS<F>
impl<F: PrimeField> Display for R1CS<F>
Source§impl<F: PrimeField> From<R1CS<F>> for Assignment<F>
impl<F: PrimeField> From<R1CS<F>> for Assignment<F>
Auto Trait Implementations§
impl<F> Freeze for R1CS<F>
impl<F> RefUnwindSafe for R1CS<F>where
F: RefUnwindSafe,
impl<F> !Send for R1CS<F>
impl<F> !Sync for R1CS<F>
impl<F> Unpin for R1CS<F>
impl<F> UnwindSafe for R1CS<F>where
F: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more