Trait p25::coding::trellis::States
[−]
[src]
pub trait States { type Symbol; fn size() -> usize; fn pair_idx(cur: usize, next: usize) -> usize; fn state(input: Self::Symbol) -> usize; fn symbol(state: usize) -> Self::Symbol; fn finisher() -> Self::Symbol; fn pair(state: usize, next: usize) -> (Dibit, Dibit) { ... } }
Associated Types
type Symbol
Symbol type to use for states and input.
Required Methods
fn size() -> usize
Number of rows/columns in the state machine.
fn pair_idx(cur: usize, next: usize) -> usize
Get the "constellation point" on the transition from the current state to the next state.
fn state(input: Self::Symbol) -> usize
Convert the given symbol to a state.
fn symbol(state: usize) -> Self::Symbol
Convert the given state to a symbol.
fn finisher() -> Self::Symbol
Get the "flushing" symbol fed in at the end of a stream.
Provided Methods
fn pair(state: usize, next: usize) -> (Dibit, Dibit)
Get the dibit pair on the transition from the current state to the next state.
Implementors
impl States for DibitStates type Symbol = Dibit;
impl States for TribitStates type Symbol = Tribit;