pub enum RateBackendPredictor {
Show 13 variants
Rosa {
model: RosaPlus,
min_prob: f64,
},
Match {
model: MatchModel,
min_prob: f64,
},
SparseMatch {
model: SparseMatchModel,
min_prob: f64,
},
Ppmd {
model: PpmdModel,
min_prob: f64,
},
Sequitur {
model: SequiturModel,
min_prob: f64,
},
Ctw {
tree: FacContextTree,
min_prob: f64,
},
FacCtw {
tree: FacContextTree,
bits_per_symbol: usize,
min_prob: f64,
},
Rwkv7 {
compressor: Compressor,
primed: bool,
pdf_scratch: Vec<f64>,
min_prob: f64,
},
Mamba {
compressor: Compressor,
primed: bool,
pdf_scratch: Vec<f64>,
min_prob: f64,
},
Zpaq {
model: ZpaqRateModel,
},
Mixture {
runtime: MixtureRuntime,
},
Particle {
runtime: ParticleRuntime,
},
Calibrated {
base: Box<RateBackendPredictor>,
core: CalibratorCore,
pdf: [f64; 256],
valid: bool,
min_prob: f64,
},
}Expand description
A concrete online predictor backed by a RateBackend configuration.
Variants§
Rosa
ROSA-Plus online suffix automaton.
Match
Local contiguous match predictor.
SparseMatch
Sparse/gapped local match predictor.
Fields
model: SparseMatchModelSparse-match model state.
Ppmd
Bounded-memory PPMD-style predictor.
Sequitur
Exact online Sequitur grammar backend with predictive suffix contexts.
Fields
model: SequiturModelSequitur model state.
Ctw
Byte-wise CTW implemented as 8 factorized bit trees (MSB-first).
Fields
tree: FacContextTreeFAC-CTW tree stack (8 bits per byte).
FacCtw
Factorized CTW with configurable bit-encoding (LSB-first).
Fields
tree: FacContextTreeFAC-CTW tree stack for configured bit width.
Rwkv7
RWKV-7 neural predictor.
Fields
compressor: CompressorRWKV compressor/runtime state.
Mamba
Mamba-1 neural predictor.
Fields
compressor: CompressorMamba compressor/runtime state.
Zpaq
ZPAQ streaming rate model.
Fields
model: ZpaqRateModelZPAQ rate model state.
Mixture
Online mixture over experts (Bayes, fading Bayes, switching, MDL).
Fields
runtime: MixtureRuntimeActive mixture runtime.
Particle
Particle-latent filter ensemble.
Fields
runtime: ParticleRuntimeParticle runtime.
Calibrated
Calibrated wrapper around another predictor.
Fields
base: Box<RateBackendPredictor>Wrapped predictor whose PDF is calibrated.
core: CalibratorCoreOnline calibrator state and context features.
Implementations§
Source§impl RateBackendPredictor
impl RateBackendPredictor
Sourcepub fn from_backend(backend: RateBackend, max_order: i64, min_prob: f64) -> Self
pub fn from_backend(backend: RateBackend, max_order: i64, min_prob: f64) -> Self
Create a new online predictor from a rate backend configuration.
Sourcepub fn default_name(backend: &RateBackend, max_order: i64) -> String
pub fn default_name(backend: &RateBackend, max_order: i64) -> String
Human-readable default name for a backend + config.
Trait Implementations§
Source§impl Clone for RateBackendPredictor
impl Clone for RateBackendPredictor
Source§fn clone(&self) -> RateBackendPredictor
fn clone(&self) -> RateBackendPredictor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl OnlineBytePredictor for RateBackendPredictor
impl OnlineBytePredictor for RateBackendPredictor
Source§fn begin_stream(&mut self, total_symbols: Option<u64>) -> Result<(), String>
fn begin_stream(&mut self, total_symbols: Option<u64>) -> Result<(), String>
Source§fn log_prob(&mut self, symbol: u8) -> f64
fn log_prob(&mut self, symbol: u8) -> f64
symbol given the current history.Source§fn fill_log_probs(&mut self, out: &mut [f64; 256])
fn fill_log_probs(&mut self, out: &mut [f64; 256])
Source§fn log_prob_update(&mut self, symbol: u8) -> f64
fn log_prob_update(&mut self, symbol: u8) -> f64
symbol, then update the predictor.Source§fn reset_frozen(&mut self, total_symbols: Option<u64>) -> Result<(), String>
fn reset_frozen(&mut self, total_symbols: Option<u64>) -> Result<(), String>
Source§fn update_frozen(&mut self, symbol: u8)
fn update_frozen(&mut self, symbol: u8)
Auto Trait Implementations§
impl Freeze for RateBackendPredictor
impl !RefUnwindSafe for RateBackendPredictor
impl Send for RateBackendPredictor
impl !Sync for RateBackendPredictor
impl Unpin for RateBackendPredictor
impl UnsafeUnpin for RateBackendPredictor
impl !UnwindSafe for RateBackendPredictor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> OnlineBytePredictorClone for Twhere
T: 'static + OnlineBytePredictor + Clone,
impl<T> OnlineBytePredictorClone for Twhere
T: 'static + OnlineBytePredictor + Clone,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.