pub fn alloc_zero<F: PrimeField, CS: ConstraintSystem<F>>(
  mut cs: CS,
) -> Result<AllocatedNum<F>, SynthesisError> {
  let zero = AllocatedNum::alloc(cs.namespace(|| "alloc"), || Ok(F::zero()))?;
  cs.enforce(
    || "check zero is valid",
    |lc| lc,
    |lc| lc,
    |lc| lc + zero.get_variable(),
  );
  Ok(zero)
}
/// Allocate a variable that is set to zero
Allocate a variable that is set to zero
Allocate a variable that is set to zero
pub fn alloc_zero<F: PrimeField, CS: ConstraintSystem<F>>(
  mut cs: CS,
) -> Result<AllocatedNum<F>, SynthesisError> {
  let zero = AllocatedNum::alloc(cs.namespace(|| "alloc"), || Ok(F::zero()))?;
  cs.enforce(
    || "check zero is valid",
    |lc| lc,
    |lc| lc,
    |lc| lc + zero.get_variable(),
  );
  Ok(zero)
}
pub fn alloc_zero < F : PrimeField , CS : ConstraintSystem < F > > ( mut cs : CS , ) -> Result < AllocatedNum < F > , SynthesisError > { let zero = AllocatedNum :: alloc ( cs . namespace ( | | " " ) , | | Ok ( F :: zero ( ) ) ) ? ; cs . enforce ( | | " " , | lc | lc , | lc | lc , | lc | lc + zero . get_variable ( ) , ) ; Ok ( zero ) }
Allocate a variable that is set to zero
Allocate a variable that is set to zero
cs
CS
cs
CS