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

    let u = alloc_one(cs.namespace(|| "one"))?;

    let X0 = BigNat::from_num(
      cs.namespace(|| "allocate X0 from relaxed r1cs"),
      Num::from(inst.X0.clone()),
      limb_width,
      n_limbs,
    )?;

    let X1 = BigNat::from_num(
      cs.namespace(|| "allocate X1 from relaxed r1cs"),
      Num::from(inst.X1.clone()),
      limb_width,
      n_limbs,
    )?;

    Ok(AllocatedRelaxedR1CSInstance {
      W: inst.W,
      E,
      u,
      X0,
      X1,
    })
  }
/// Allocates the R1CS Instance as a RelaxedR1CSInstance in the circuit.
/// E = 0, u = 1
Allocates the R1CS Instance as a RelaxedR1CSInstance in the circuit.
Allocates the R1CS Instance as a RelaxedR1CSInstance in the circuit .
pub fn from_r1cs_instance<CS: ConstraintSystem<<G as Group>::Base>>(
    mut cs: CS,
    inst: AllocatedR1CSInstance<G>,
    limb_width: usize,
    n_limbs: usize,
  ) -> Result<Self, SynthesisError> {
    let E = AllocatedPoint::default(cs.namespace(|| "allocate W"))?;
    let u = alloc_one(cs.namespace(|| "one"))?;
    let X0 = BigNat::from_num(
      cs.namespace(|| "allocate X0 from relaxed r1cs"),
      Num::from(inst.X0.clone()),
      limb_width,
      n_limbs,
    )?;
    let X1 = BigNat::from_num(
      cs.namespace(|| "allocate X1 from relaxed r1cs"),
      Num::from(inst.X1.clone()),
      limb_width,
      n_limbs,
    )?;
    Ok(AllocatedRelaxedR1CSInstance {
      W: inst.W,
      E,
      u,
      X0,
      X1,
    })
  }
pub fn from_r1cs_instance < CS : ConstraintSystem < < G as Group > :: Base > > ( mut cs : CS , inst : AllocatedR1CSInstance < G > , limb_width : usize , n_limbs : usize , ) -> Result < Self , SynthesisError > { let E = AllocatedPoint :: default ( cs . namespace ( | | " " ) ) ? ; let u = alloc_one ( cs . namespace ( | | " " ) ) ? ; let X0 = BigNat :: from_num ( cs . namespace ( | | " " ) , Num :: from ( inst . X0 . clone ( ) ) , limb_width , n_limbs , ) ? ; let X1 = BigNat :: from_num ( cs . namespace ( | | " " ) , Num :: from ( inst . X1 . clone ( ) ) , limb_width , n_limbs , ) ? ; Ok ( AllocatedRelaxedR1CSInstance { W : inst . W , E , u , X0 , X1 , } ) }
Allocates the R1CS Instance as a RelaxedR1CSInstance in the circuit.
Allocates the R1CS Instance as a RelaxedR1CSInstance in the circuit .
cs
CS
inst
AllocatedR1CSInstance<G>
limb_width
usize
n_limbs
usize
cs
CS
inst
AllocatedR1CSInstance<G>
limb_width
usize
n_limbs
usize