pub fn equal<CS: ConstraintSystem<E>>(
        &self,
        mut cs: CS,
        other: &Self,
    ) -> Result<(), SynthesisError> {
        if self.limbs.len() < other.limbs.len() {
            return other.equal(cs, self);
        }
        self.enforce_limb_width_agreement(other, "equal")?;
        let n = other.limbs.len();
        for i in 0..n {
            cs.enforce(
                || format!("equal {}", i),
                |lc| lc,
                |lc| lc,
                |lc| lc + &self.limbs[i] - &other.limbs[i],
            );
        }
        for i in n..(self.limbs.len()) {
            cs.enforce(
                || format!("equal {}", i),
                |lc| lc,
                |lc| lc,
                |lc| lc + &self.limbs[i],
            );
        }
        Ok(())
    }
/// Constrain `self` to be equal to `other`, assuming that they're both properly carried.
Constrain `self` to be equal to `other`, assuming that they're both properly carried.
Constrain ` self ` to be equal to ` other ` assuming that they ' re both properly carried .
pub fn equal<CS: ConstraintSystem<E>>(
        &self,
        mut cs: CS,
        other: &Self,
    ) -> Result<(), SynthesisError> {
        if self.limbs.len() < other.limbs.len() {
            return other.equal(cs, self);
        }
        self.enforce_limb_width_agreement(other, "equal")?;
        let n = other.limbs.len();
        for i in 0..n {
            cs.enforce(
                || format!("equal {}", i),
                |lc| lc,
                |lc| lc,
                |lc| lc + &self.limbs[i] - &other.limbs[i],
            );
        }
        for i in n..(self.limbs.len()) {
            cs.enforce(
                || format!("equal {}", i),
                |lc| lc,
                |lc| lc,
                |lc| lc + &self.limbs[i],
            );
        }
        Ok(())
    }
pub fn equal < CS : ConstraintSystem < E > > ( & self , mut cs : CS , other : & Self , ) -> Result < ( ) , SynthesisError > { if self . limbs . len ( ) < other . limbs . len ( ) { return other . equal ( cs , self ) ; } self . enforce_limb_width_agreement ( other , " " ) ? ; let n = other . limbs . len ( ) ; for i in 0 .. n { cs . enforce ( | | format ! ( " " i ) , | lc | lc , | lc | lc , | lc | lc + & self . limbs [ i ] - & other . limbs [ i ] , ) ; } for i in n .. ( self . limbs . len ( ) ) { cs . enforce ( | | format ! ( " " i ) , | lc | lc , | lc | lc , | lc | lc + & self . limbs [ i ] , ) ; } Ok ( ( ) ) }
Constrain `self` to be equal to `other`, assuming that they're both properly carried.
Constrain ` self ` to be equal to ` other ` assuming that they ' re both properly carried .
&self
cs
CS
other
&Self
&self
cs
CS
other
&Self