Struct guff::F16[][src]

pub struct F16 {
    pub full: u32,
    pub compact: u16,
}
Expand description

A type implementing (default) maths in GF(216)

Fields

full: u32compact: u16

Trait Implementations

Formats the value using the given formatter. Read more

Natural storage class (u8, u16, u32, etc.) for storing elements of the field. Read more

The next largest natural storage class, eg if E is u8, then EE should be U16. Used for: Read more

As EE, but signed. Used internally to implement some lookup tables. Read more

Size of the field in bits, eg GF(28) → 8

High bit of field polynomial, eg GF(28) → 0x100

Mask for selecting all bits of field value, eg GF(28) → 0xff Read more

High bit of field values, eg GF(28) → 0x80

The field polynomial with (implicit) high bit stripped off.

Field polynomial in full, with high poly bit set

Addition in Galois Fields GF(2x) is simply XOR

Subtraction is the same as addition in GF(2x)

Polynomial multiplication modulo the field polynomial

Division modulo to the field polynomial (default implementation calculated as a・b-1) Read more

Calculate polynomial a-1 modulo the field polynomial (using Extended Euclidean method) Read more

Calculate polynomial ab modulo the field polynomial Read more

Access Self::HIGH_BIT as a method

Access Self::ORDER as a method

Access Self::FIELD_MASK as a method

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.