pub fn absorb_in_ro<CS: ConstraintSystem<<G as Group>::Base>>(
    &self,
    mut cs: CS,
    ro: &mut PoseidonROGadget<G::Base>,
  ) -> Result<(), SynthesisError> {
    ro.absorb(self.W.x.clone());
    ro.absorb(self.W.y.clone());
    ro.absorb(self.W.is_infinity.clone());
    ro.absorb(self.E.x.clone());
    ro.absorb(self.E.y.clone());
    ro.absorb(self.E.is_infinity.clone());
    ro.absorb(self.u.clone());

    // Analyze X0 as limbs
    let X0_bn = self
      .X0
      .as_limbs::<CS>()
      .iter()
      .enumerate()
      .map(|(i, limb)| {
        limb
          .as_sapling_allocated_num(cs.namespace(|| format!("convert limb {} of X_r[0] to num", i)))
      })
      .collect::<Result<Vec<AllocatedNum<G::Base>>, _>>()?;

    // absorb each of the limbs of X[0]
    for limb in X0_bn.into_iter() {
      ro.absorb(limb);
    }

    // Analyze X1 as limbs
    let X1_bn = self
      .X1
      .as_limbs::<CS>()
      .iter()
      .enumerate()
      .map(|(i, limb)| {
        limb
          .as_sapling_allocated_num(cs.namespace(|| format!("convert limb {} of X_r[1] to num", i)))
      })
      .collect::<Result<Vec<AllocatedNum<G::Base>>, _>>()?;

    // absorb each of the limbs of X[1]
    for limb in X1_bn.into_iter() {
      ro.absorb(limb);
    }

    Ok(())
  }
/// Absorb the provided instance in the RO
Absorb the provided instance in the RO
Absorb the provided instance in the RO
pub fn absorb_in_ro<CS: ConstraintSystem<<G as Group>::Base>>(
    &self,
    mut cs: CS,
    ro: &mut PoseidonROGadget<G::Base>,
  ) -> Result<(), SynthesisError> {
    ro.absorb(self.W.x.clone());
    ro.absorb(self.W.y.clone());
    ro.absorb(self.W.is_infinity.clone());
    ro.absorb(self.E.x.clone());
    ro.absorb(self.E.y.clone());
    ro.absorb(self.E.is_infinity.clone());
    ro.absorb(self.u.clone());
    // Analyze X0 as limbs
    let X0_bn = self
      .X0
      .as_limbs::<CS>()
      .iter()
      .enumerate()
      .map(|(i, limb)| {
        limb
          .as_sapling_allocated_num(cs.namespace(|| format!("convert limb {} of X_r[0] to num", i)))
      })
      .collect::<Result<Vec<AllocatedNum<G::Base>>, _>>()?;
    // absorb each of the limbs of X[0]
    for limb in X0_bn.into_iter() {
      ro.absorb(limb);
    }
    // Analyze X1 as limbs
    let X1_bn = self
      .X1
      .as_limbs::<CS>()
      .iter()
      .enumerate()
      .map(|(i, limb)| {
        limb
          .as_sapling_allocated_num(cs.namespace(|| format!("convert limb {} of X_r[1] to num", i)))
      })
      .collect::<Result<Vec<AllocatedNum<G::Base>>, _>>()?;
    // absorb each of the limbs of X[1]
    for limb in X1_bn.into_iter() {
      ro.absorb(limb);
    }
    Ok(())
  }
pub fn absorb_in_ro < CS : ConstraintSystem < < G as Group > :: Base > > ( & self , mut cs : CS , ro : & mut PoseidonROGadget < G :: Base > , ) -> Result < ( ) , SynthesisError > { ro . absorb ( self . W . x . clone ( ) ) ; ro . absorb ( self . W . y . clone ( ) ) ; ro . absorb ( self . W . is_infinity . clone ( ) ) ; ro . absorb ( self . E . x . clone ( ) ) ; ro . absorb ( self . E . y . clone ( ) ) ; ro . absorb ( self . E . is_infinity . clone ( ) ) ; ro . absorb ( self . u . clone ( ) ) ; // Analyze X0 as limbs let X0_bn = self . X0 . as_limbs :: < CS > ( ) . iter ( ) . enumerate ( ) . map ( | ( i , limb ) | { limb . as_sapling_allocated_num ( cs . namespace ( | | format ! ( " " i ) ) ) } ) . collect :: < Result < Vec < AllocatedNum < G :: Base > > , _ > > ( ) ? ; // absorb each of the limbs of X[0] for limb in X0_bn . into_iter ( ) { ro . absorb ( limb ) ; } // Analyze X1 as limbs let X1_bn = self . X1 . as_limbs :: < CS > ( ) . iter ( ) . enumerate ( ) . map ( | ( i , limb ) | { limb . as_sapling_allocated_num ( cs . namespace ( | | format ! ( " " i ) ) ) } ) . collect :: < Result < Vec < AllocatedNum < G :: Base > > , _ > > ( ) ? ; // absorb each of the limbs of X[1] for limb in X1_bn . into_iter ( ) { ro . absorb ( limb ) ; } Ok ( ( ) ) }
Absorb the provided instance in the RO
Absorb the provided instance in the RO
&self
cs
CS
ro
&mut PoseidonROGadget<G::Base>
&self
cs
CS
ro
&mut PoseidonROGadget<G::Base>