pub fn default<CS: ConstraintSystem<<G as Group>::Base>>(
    mut cs: CS,
    limb_width: usize,
    n_limbs: usize,
  ) -> Result<Self, SynthesisError> {
    let W = AllocatedPoint::default(cs.namespace(|| "allocate W"))?;
    let E = W.clone();

    let u = W.x.clone(); // In the default case, W.x = u = 0

    let X0 = BigNat::alloc_from_nat(
      cs.namespace(|| "allocate x_default[0]"),
      || Ok(f_to_nat(&G::Scalar::zero())),
      limb_width,
      n_limbs,
    )?;

    let X1 = BigNat::alloc_from_nat(
      cs.namespace(|| "allocate x_default[1]"),
      || Ok(f_to_nat(&G::Scalar::zero())),
      limb_width,
      n_limbs,
    )?;

    Ok(AllocatedRelaxedR1CSInstance { W, E, u, X0, X1 })
  }
/// Allocates the hardcoded default RelaxedR1CSInstance in the circuit.
/// W = E = 0, u = 1, X0 = X1 = 0
Allocates the hardcoded default RelaxedR1CSInstance in the circuit.
Allocates the hardcoded default RelaxedR1CSInstance in the circuit .
pub fn default<CS: ConstraintSystem<<G as Group>::Base>>(
    mut cs: CS,
    limb_width: usize,
    n_limbs: usize,
  ) -> Result<Self, SynthesisError> {
    let W = AllocatedPoint::default(cs.namespace(|| "allocate W"))?;
    let E = W.clone();
    let u = W.x.clone(); // In the default case, W.x = u = 0
    let X0 = BigNat::alloc_from_nat(
      cs.namespace(|| "allocate x_default[0]"),
      || Ok(f_to_nat(&G::Scalar::zero())),
      limb_width,
      n_limbs,
    )?;
    let X1 = BigNat::alloc_from_nat(
      cs.namespace(|| "allocate x_default[1]"),
      || Ok(f_to_nat(&G::Scalar::zero())),
      limb_width,
      n_limbs,
    )?;
    Ok(AllocatedRelaxedR1CSInstance { W, E, u, X0, X1 })
  }
pub fn default < CS : ConstraintSystem < < G as Group > :: Base > > ( mut cs : CS , limb_width : usize , n_limbs : usize , ) -> Result < Self , SynthesisError > { let W = AllocatedPoint :: default ( cs . namespace ( | | " " ) ) ? ; let E = W . clone ( ) ; let u = W . x . clone ( ) ; // In the default case, W.x = u = 0 let X0 = BigNat :: alloc_from_nat ( cs . namespace ( | | " " ) , | | Ok ( f_to_nat ( & G :: Scalar :: zero ( ) ) ) , limb_width , n_limbs , ) ? ; let X1 = BigNat :: alloc_from_nat ( cs . namespace ( | | " " ) , | | Ok ( f_to_nat ( & G :: Scalar :: zero ( ) ) ) , limb_width , n_limbs , ) ? ; Ok ( AllocatedRelaxedR1CSInstance { W , E , u , X0 , X1 } ) }
Allocates the hardcoded default RelaxedR1CSInstance in the circuit.
Allocates the hardcoded default RelaxedR1CSInstance in the circuit .
cs
CS
limb_width
usize
n_limbs
usize
cs
CS
limb_width
usize
n_limbs
usize