SymbolCost

Trait SymbolCost 

Source
pub trait SymbolCost: Sized {
    // Required method
    fn symbol_cost(x: &Option<Self>) -> u16;
}
Expand description

Defines the cost of a type of lemma

Required Methods§

Source

fn symbol_cost(x: &Option<Self>) -> u16

This is the length of a member where each sub-unit has n_phonemes possible encodings.

§Example

Let Phon = ${a,b,c}$ so, n_phonemes should be 3 (passed to Lexicon::mdl_score. The string, abcabc should have symbol_cost 6.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SymbolCost for &str

Source§

fn symbol_cost(x: &Option<Self>) -> u16

Source§

impl SymbolCost for char

Source§

fn symbol_cost(x: &Option<Self>) -> u16

Source§

impl SymbolCost for u8

Source§

fn symbol_cost(x: &Option<Self>) -> u16

Source§

impl SymbolCost for String

Source§

fn symbol_cost(x: &Option<Self>) -> u16

Implementors§