pub struct MetaMixer { /* private fields */ }Expand description
MetaMixer blends two 12-bit probability sources.
Implementations§
Source§impl MetaMixer
impl MetaMixer
Sourcepub fn new(gru_weight_pct: u32) -> Self
pub fn new(gru_weight_pct: u32) -> Self
Create a new MetaMixer with a given GRU weight percentage (0-100). Start conservative at 5% since GRU needs warmup time.
Sourcepub fn blend(&mut self, p_cm: u32, p_gru: u32) -> u32
pub fn blend(&mut self, p_cm: u32, p_gru: u32) -> u32
Blend CM and GRU predictions.
p_cm: CM engine 12-bit probability [1, 4095].
p_gru: GRU 12-bit probability [1, 4095].
Returns: blended 12-bit probability [1, 4095].
Sourcepub fn last_prediction(&self) -> u32
pub fn last_prediction(&self) -> u32
Get the last output probability (for diagnostics).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetaMixer
impl RefUnwindSafe for MetaMixer
impl Send for MetaMixer
impl Sync for MetaMixer
impl Unpin for MetaMixer
impl UnsafeUnpin for MetaMixer
impl UnwindSafe for MetaMixer
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more