pub struct AddMultProb {
pub probability_epsilon: f64,
}Expand description
(plus = noisy-OR, times = product, negate = 1 - p).
Stateful: carries probability_epsilon, the threshold below which
times switches into log-space accumulation to avoid floating-point
underflow (spec §5.3). This keeps the underflow guard inside the
semiring rather than scattering it across executors.
Fields§
§probability_epsilon: f64Implementations§
Trait Implementations§
Source§impl Clone for AddMultProb
impl Clone for AddMultProb
Source§fn clone(&self) -> AddMultProb
fn clone(&self) -> AddMultProb
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AddMultProb
Source§impl Debug for AddMultProb
impl Debug for AddMultProb
Source§impl Default for AddMultProb
impl Default for AddMultProb
Source§impl LocySemiring for AddMultProb
impl LocySemiring for AddMultProb
Source§type Tag = f64
type Tag = f64
The per-tuple tag type. For the two Phase-A semirings this is
f64; C0’s TopKProofs will carry a proof-DNF tag.fn kind(&self) -> SemiringKind
Source§fn zero_disjunction(&self) -> f64
fn zero_disjunction(&self) -> f64
Identity for
plus — 0.0 for both Phase-A semirings.Source§fn one_conjunction(&self) -> f64
fn one_conjunction(&self) -> f64
Identity for
times — 1.0 for both Phase-A semirings.Source§fn negate(&self, a: &f64) -> Result<f64, SemiringError>
fn negate(&self, a: &f64) -> Result<f64, SemiringError>
Complement (
1 - p conventionally). May return
SemiringError::NotSupported for semirings whose tags do not
admit a complement.Source§fn validate_domain(
&self,
raw: f64,
op: &'static str,
strict: bool,
) -> Result<f64, SemiringError>
fn validate_domain( &self, raw: f64, op: &'static str, strict: bool, ) -> Result<f64, SemiringError>
Domain-check a raw scalar before feeding it to
plus / times.
Returns the clamped value, or DomainViolation when strict is
set and raw falls outside [0, 1]. Emits the same tracing literal
("MNOR input ..." / "MPROD input ...") used in the pre-refactor
code so any string-asserting tests remain stable.Auto Trait Implementations§
impl Freeze for AddMultProb
impl RefUnwindSafe for AddMultProb
impl Send for AddMultProb
impl Sync for AddMultProb
impl Unpin for AddMultProb
impl UnsafeUnpin for AddMultProb
impl UnwindSafe for AddMultProb
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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