INNER CODE UNIT · Rust

add

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

  fn add(self, rhs: Self) -> Self::Output {
    if self == rhs {
      Self::ZERO
    } else {
      Self::ONE
    }
  }
}

impl AddAssign for BinaryField {
  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)
  }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…