INNER CODE UNIT · Rust

mul

pluto/ronkathon · src/algebra/field/binary_towers/mod.rs:106

  fn mul(self, rhs: Self) -> Self::Output {
    match (self, rhs) {
      (Self::One, Self::One) => Self::ONE,
      _ => Self::ZERO,
    }
  }
}

impl MulAssign for BinaryField {
  fn mul_assign(&mut self, rhs: Self) { *self = *self * rhs; }
}

impl Product for BinaryField {
  fn product<I: Iterator<Item = Self>>(iter: I) -> Self {
    iter.reduce(|x, y| x * y).unwrap_or(Self::ONE)
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…