pub fn conditionally_select<CS: ConstraintSystem<<G as Group>::Base>>(
    &self,
    mut cs: CS,
    other: AllocatedRelaxedR1CSInstance<G>,
    condition: &Boolean,
  ) -> Result<AllocatedRelaxedR1CSInstance<G>, SynthesisError> {
    let W = AllocatedPoint::conditionally_select(
      cs.namespace(|| "W = cond ? self.W : other.W"),
      &self.W,
      &other.W,
      condition,
    )?;

    let E = AllocatedPoint::conditionally_select(
      cs.namespace(|| "E = cond ? self.E : other.E"),
      &self.E,
      &other.E,
      condition,
    )?;

    let u = conditionally_select(
      cs.namespace(|| "u = cond ? self.u : other.u"),
      &self.u,
      &other.u,
      condition,
    )?;

    let X0 = conditionally_select_bignat(
      cs.namespace(|| "X[0] = cond ? self.X[0] : other.X[0]"),
      &self.X0,
      &other.X0,
      condition,
    )?;

    let X1 = conditionally_select_bignat(
      cs.namespace(|| "X[1] = cond ? self.X[1] : other.X[1]"),
      &self.X1,
      &other.X1,
      condition,
    )?;

    Ok(AllocatedRelaxedR1CSInstance { W, E, u, X0, X1 })
  }
/// If the condition is true then returns this otherwise it returns the other
If the condition is true then returns this otherwise it returns the other
If the condition is true then returns this otherwise it returns the other
pub fn conditionally_select<CS: ConstraintSystem<<G as Group>::Base>>(
    &self,
    mut cs: CS,
    other: AllocatedRelaxedR1CSInstance<G>,
    condition: &Boolean,
  ) -> Result<AllocatedRelaxedR1CSInstance<G>, SynthesisError> {
    let W = AllocatedPoint::conditionally_select(
      cs.namespace(|| "W = cond ? self.W : other.W"),
      &self.W,
      &other.W,
      condition,
    )?;
    let E = AllocatedPoint::conditionally_select(
      cs.namespace(|| "E = cond ? self.E : other.E"),
      &self.E,
      &other.E,
      condition,
    )?;
    let u = conditionally_select(
      cs.namespace(|| "u = cond ? self.u : other.u"),
      &self.u,
      &other.u,
      condition,
    )?;
    let X0 = conditionally_select_bignat(
      cs.namespace(|| "X[0] = cond ? self.X[0] : other.X[0]"),
      &self.X0,
      &other.X0,
      condition,
    )?;
    let X1 = conditionally_select_bignat(
      cs.namespace(|| "X[1] = cond ? self.X[1] : other.X[1]"),
      &self.X1,
      &other.X1,
      condition,
    )?;
    Ok(AllocatedRelaxedR1CSInstance { W, E, u, X0, X1 })
  }
pub fn conditionally_select < CS : ConstraintSystem < < G as Group > :: Base > > ( & self , mut cs : CS , other : AllocatedRelaxedR1CSInstance < G > , condition : & Boolean , ) -> Result < AllocatedRelaxedR1CSInstance < G > , SynthesisError > { let W = AllocatedPoint :: conditionally_select ( cs . namespace ( | | " " ) , & self . W , & other . W , condition , ) ? ; let E = AllocatedPoint :: conditionally_select ( cs . namespace ( | | " " ) , & self . E , & other . E , condition , ) ? ; let u = conditionally_select ( cs . namespace ( | | " " ) , & self . u , & other . u , condition , ) ? ; let X0 = conditionally_select_bignat ( cs . namespace ( | | " " ) , & self . X0 , & other . X0 , condition , ) ? ; let X1 = conditionally_select_bignat ( cs . namespace ( | | " " ) , & self . X1 , & other . X1 , condition , ) ? ; Ok ( AllocatedRelaxedR1CSInstance { W , E , u , X0 , X1 } ) }
If the condition is true then returns this otherwise it returns the other
If the condition is true then returns this otherwise it returns the other
&self
cs
CS
other
AllocatedRelaxedR1CSInstance<G>
condition
&Boolean
&self
cs
CS
other
AllocatedRelaxedR1CSInstance<G>
condition
&Boolean