`rhs` has higher priority. So if `rhs.a_is_smaller` or `rhs.b_is_smaller` is set to 1 for a specific position, this value is used. Otherwise, values from `self` are used. Multiplication depth of formulas here is 1, which is important for performance reasons.
(&self, rhs: &Self)
| 130 | /// Multiplication depth of formulas here is 1, which is important for performance |
| 131 | /// reasons. |
| 132 | fn join(&self, rhs: &Self) -> Result<Self> { |
| 133 | let graph = &self.a_equal_b.get_graph(); |
| 134 | let one = graph.ones(scalar_type(BIT))?; |
| 135 | |
| 136 | let a = self |
| 137 | .a |
| 138 | .multiply(rhs.a_equal_b.clone())? |
| 139 | .add(rhs.a.multiply(rhs.a_equal_b.add(one)?)?)?; |
| 140 | |
| 141 | let a_equal_b = self.a_equal_b.multiply(rhs.a_equal_b.clone())?; |
| 142 | |
| 143 | Ok(Self { a_equal_b, a }) |
| 144 | } |
| 145 | |
| 146 | /// Joins even-indexed and odd-indexed values |
| 147 | /// If the number of elements is not divisible by two, |