pub struct Hypothesis {
pub id: String,
pub claim: String,
pub supporting_proposals: Vec<ProposalId>,
pub testable: bool,
/* private fields */
}Expand description
Hypothesis - exploration phase artifact.
Represents a testable claim during the exploration phase of the six-phase flow.
Fields§
§id: StringUnique identifier.
claim: StringThe claim being hypothesized.
supporting_proposals: Vec<ProposalId>Proposals that support this hypothesis.
testable: boolWhether this hypothesis is testable.
Implementations§
Source§impl Hypothesis
impl Hypothesis
Sourcepub fn new(id: impl Into<String>, claim: impl Into<String>) -> Hypothesis
pub fn new(id: impl Into<String>, claim: impl Into<String>) -> Hypothesis
Create a new hypothesis.
Sourcepub fn confidence(&self) -> f32
pub fn confidence(&self) -> f32
Returns the confidence score, always in [0.0, 1.0].
Sourcepub fn with_confidence(self, confidence: f32) -> Hypothesis
pub fn with_confidence(self, confidence: f32) -> Hypothesis
Set confidence baseline, clamped to [0.0, 1.0].
Sourcepub fn adjust_confidence(self, delta: f32) -> Hypothesis
pub fn adjust_confidence(self, delta: f32) -> Hypothesis
Adjust confidence by a delta, clamped to [0.0, 1.0].
Sourcepub fn with_support(self, proposals: Vec<ProposalId>) -> Hypothesis
pub fn with_support(self, proposals: Vec<ProposalId>) -> Hypothesis
Add supporting proposals.
Sourcepub fn untestable(self) -> Hypothesis
pub fn untestable(self) -> Hypothesis
Mark as untestable.
Sourcepub fn is_high_confidence(&self) -> bool
pub fn is_high_confidence(&self) -> bool
Check if confidence is high (>= 0.7).
Sourcepub fn is_low_confidence(&self) -> bool
pub fn is_low_confidence(&self) -> bool
Check if confidence is low (< 0.3).
Trait Implementations§
Source§impl Clone for Hypothesis
impl Clone for Hypothesis
Source§fn clone(&self) -> Hypothesis
fn clone(&self) -> Hypothesis
Returns a duplicate of the value. Read more
1.0.0 · 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 Hypothesis
impl Debug for Hypothesis
Source§impl<'de> Deserialize<'de> for Hypothesis
impl<'de> Deserialize<'de> for Hypothesis
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Hypothesis, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Hypothesis, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Hypothesis
impl Serialize for Hypothesis
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Hypothesis
impl RefUnwindSafe for Hypothesis
impl Send for Hypothesis
impl Sync for Hypothesis
impl Unpin for Hypothesis
impl UnsafeUnpin for Hypothesis
impl UnwindSafe for Hypothesis
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