pub struct HypothesisConclusion { /* private fields */ }Expand description
Data needed to materialize one Bayesian hypothesis after a rule matches.
Implementations§
Source§impl HypothesisConclusion
impl HypothesisConclusion
Sourcepub fn new(
predicate: KnowledgePredicate,
value: EvidenceValue,
prior: Probability,
strength: HypothesisStrength,
state: HypothesisState,
calibrations: Vec<EvidenceCalibration>,
) -> Result<Self, RuleEngineError>
pub fn new( predicate: KnowledgePredicate, value: EvidenceValue, prior: Probability, strength: HypothesisStrength, state: HypothesisState, calibrations: Vec<EvidenceCalibration>, ) -> Result<Self, RuleEngineError>
Creates a conclusion backed by one or more calibrated observations.
Sourcepub fn predicate(&self) -> &KnowledgePredicate
pub fn predicate(&self) -> &KnowledgePredicate
Returns the conclusion predicate.
Sourcepub fn value(&self) -> &EvidenceValue
pub fn value(&self) -> &EvidenceValue
Returns the conclusion value.
Sourcepub fn prior(&self) -> Probability
pub fn prior(&self) -> Probability
Returns the calibrated prior.
Sourcepub fn strength(&self) -> HypothesisStrength
pub fn strength(&self) -> HypothesisStrength
Returns the rule-assigned evidence strength.
Sourcepub fn state(&self) -> HypothesisState
pub fn state(&self) -> HypothesisState
Returns the non-verifier lifecycle state.
Sourcepub fn calibrations(&self) -> &[EvidenceCalibration]
pub fn calibrations(&self) -> &[EvidenceCalibration]
Returns evidence calibrations in declared rule order.
Trait Implementations§
Source§impl Clone for HypothesisConclusion
impl Clone for HypothesisConclusion
Source§fn clone(&self) -> HypothesisConclusion
fn clone(&self) -> HypothesisConclusion
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 moreSource§impl Debug for HypothesisConclusion
impl Debug for HypothesisConclusion
Source§impl<'de> Deserialize<'de> for HypothesisConclusion
impl<'de> Deserialize<'de> for HypothesisConclusion
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HypothesisConclusion
Source§impl PartialEq for HypothesisConclusion
impl PartialEq for HypothesisConclusion
Source§impl Serialize for HypothesisConclusion
impl Serialize for HypothesisConclusion
impl StructuralPartialEq for HypothesisConclusion
Auto Trait Implementations§
impl Freeze for HypothesisConclusion
impl RefUnwindSafe for HypothesisConclusion
impl Send for HypothesisConclusion
impl Sync for HypothesisConclusion
impl Unpin for HypothesisConclusion
impl UnsafeUnpin for HypothesisConclusion
impl UnwindSafe for HypothesisConclusion
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more