Struct p25::coding::galois::Codeword [] [src]

pub struct Codeword<F: GaloisField> { /* fields omitted */ }

Codeword in a Galois field.

Methods

impl<F: GaloisField> Codeword<F>
[src]

[src]

Construct a new Codeword αi from the given bit pattern. Panic if the pattern is invalid in the field.

[src]

Construct a new Codeword αm ≡ αi (modulo the field) for the given power i.

[src]

Retrieve the bit pattern of the codeword.

[src]

Check if the codeword is zero.

[src]

Retrieve the power i of the current codeword αi. Return Some(i) if the power is defined and None if the codeword is zero.

[src]

Find 1/αi for the current codeword αi. Panic if the codeword is zero.

[src]

Compute (αi)p for the current codeword αi and given power p.

Trait Implementations

impl<F: Copy + GaloisField> Copy for Codeword<F>
[src]

impl<F: Clone + GaloisField> Clone for Codeword<F>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F: GaloisField> Default for Codeword<F>
[src]

[src]

Construct the additive identity codeword α0 = 1.

impl<F: GaloisField> Add for Codeword<F>
[src]

Add codewords using Galois addition.

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<F: GaloisField> Sub for Codeword<F>
[src]

"Subtract" codewords, which is equivalent to addition.

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<F: GaloisField> Mul for Codeword<F>
[src]

Mutiply codewords using Galois multiplication.

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<F: GaloisField> Div for Codeword<F>
[src]

Divide codewords using Galois division. Panic if the divisor is zero.

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<F: GaloisField> PartialEq for Codeword<F>
[src]

Check equality of two codewords.

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<F: GaloisField> Eq for Codeword<F>
[src]

impl<F: GaloisField> PartialEq<u8> for Codeword<F>
[src]

Check equality of the codeword's bit pattern with raw bits.

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<F: GaloisField> Debug for Codeword<F>
[src]

[src]

Formats the value using the given formatter. Read more