pub struct Gf2(pub u8);Expand description
GF(2) as the multilinear ring: elements 0/1, addition is XOR, multiplication is AND.
Tuple Fields§
§0: u8Trait Implementations§
Source§impl Field for Gf2
impl Field for Gf2
Source§const MULTILINEAR: bool = true
const MULTILINEAR: bool = true
Whether the polynomial ring is multilinear (
x² = x). True for GF(2), where we impose
the field equations; false for GF(256), where quadratics are genuine.fn zero() -> Self
fn one() -> Self
fn add(self, o: Self) -> Self
fn sub(self, o: Self) -> Self
fn mul(self, o: Self) -> Self
fn is_zero(self) -> bool
impl Copy for Gf2
impl Eq for Gf2
impl StructuralPartialEq for Gf2
Auto Trait Implementations§
impl Freeze for Gf2
impl RefUnwindSafe for Gf2
impl Send for Gf2
impl Sync for Gf2
impl Unpin for Gf2
impl UnsafeUnpin for Gf2
impl UnwindSafe for Gf2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more