OnlineBytePredictor

Trait OnlineBytePredictor 

Source
pub trait OnlineBytePredictor: Send {
    // Required methods
    fn log_prob(&mut self, symbol: u8) -> f64;
    fn update(&mut self, symbol: u8);
}
Expand description

Trait for online byte-level predictors that expose per-symbol log-probabilities.

Required Methods§

Source

fn log_prob(&mut self, symbol: u8) -> f64

Log-probability (natural log) of symbol given the current history.

Source

fn update(&mut self, symbol: u8)

Update the predictor with the observed symbol.

Implementors§