pub trait OnlineBitPredictor {
// Required methods
fn bit_prediction(&mut self) -> BinaryPrediction;
fn update_bit(&mut self, bit: bool);
// Provided methods
fn begin_bit_stream(
&mut self,
_total_bits: Option<u64>,
_semantics: BitStreamSemantics,
) -> Result<(), String> { ... }
fn finish_bit_stream(&mut self) -> Result<(), String> { ... }
fn update_bit_frozen(&mut self, bit: bool) { ... }
}Expand description
Minimal bit predictor interface for true binary consumers.
Required Methods§
Sourcefn bit_prediction(&mut self) -> BinaryPrediction
fn bit_prediction(&mut self) -> BinaryPrediction
Predict the next bit without updating state.
Sourcefn update_bit(&mut self, bit: bool)
fn update_bit(&mut self, bit: bool)
Observe a bit while fitting/adapting.
Provided Methods§
Sourcefn begin_bit_stream(
&mut self,
_total_bits: Option<u64>,
_semantics: BitStreamSemantics,
) -> Result<(), String>
fn begin_bit_stream( &mut self, _total_bits: Option<u64>, _semantics: BitStreamSemantics, ) -> Result<(), String>
Optional stream-start hook.
Sourcefn finish_bit_stream(&mut self) -> Result<(), String>
fn finish_bit_stream(&mut self) -> Result<(), String>
Optional stream-finalization hook.
Sourcefn update_bit_frozen(&mut self, bit: bool)
fn update_bit_frozen(&mut self, bit: bool)
Observe a bit as conditioning only.