INNER CODE UNIT · Rust

add_assign

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

  fn add_assign(&mut self, rhs: Self) { *self = *self + rhs; }
}

impl Sum for BinaryField {
  fn sum<I: Iterator<Item = Self>>(iter: I) -> Self {
    iter.reduce(|x, y| x + y).unwrap_or(Self::ZERO)
  }
}

impl Sub for BinaryField {
  type Output = Self;

  #[allow(clippy::suspicious_arithmetic_impl)]
  fn sub(self, rhs: Self) -> Self::Output {
    if self == rhs {
      Self::ZERO
    } else {
      Self::ONE

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…