pub struct ErrorBits(pub f64);Expand description
-log2(error_probability). Higher = tighter bound.
Tuple Fields§
§0: f64Implementations§
Source§impl ErrorBits
impl ErrorBits
pub const fn from_log2(bits: f64) -> Self
pub fn from_prob(p: f64) -> Self
Sourcepub fn sum(errors: &[Self]) -> Self
pub fn sum(errors: &[Self]) -> Self
-log2(sum of error probabilities). Tight composition; use this
when terms are independent or the union bound is the operative
bound.
Sourcepub fn min(errors: &[Self]) -> Self
pub fn min(errors: &[Self]) -> Self
Minimum bits across terms. Loose but cheap — equivalent to taking the largest single error probability.
pub const fn bits(self) -> f64
pub fn floor(self) -> usize
Trait Implementations§
impl Copy for ErrorBits
impl StructuralPartialEq for ErrorBits
Auto Trait Implementations§
impl Freeze for ErrorBits
impl RefUnwindSafe for ErrorBits
impl Send for ErrorBits
impl Sync for ErrorBits
impl Unpin for ErrorBits
impl UnsafeUnpin for ErrorBits
impl UnwindSafe for ErrorBits
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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