Trait p25::coding::galois::GaloisField
[−]
[src]
pub trait GaloisField {
fn size() -> usize;
fn valid_codeword(bits: u8) -> bool;
fn codeword(pow: usize) -> u8;
fn power(codeword: usize) -> usize;
fn codeword_modded(pow: usize) -> u8 { ... }
}A GF(2r) Galois field.
Required Methods
fn size() -> usize
Number of unique codewords in the field: 2r - 1.
fn valid_codeword(bits: u8) -> bool
Check if the given bit pattern is a valid codeword in the field.
fn codeword(pow: usize) -> u8
Map the given power i to codeword αi.
fn power(codeword: usize) -> usize
Map the given codeword ai to its power i.
Provided Methods
fn codeword_modded(pow: usize) -> u8
Map the given power i to codeword αm ≡ αi (modulo the size of the field.)
Implementors
impl GaloisField for P25Field