pub struct TheoryPackage {
pub theory_id: String,
pub name: String,
pub author_did: String,
pub nature: LawNature,
pub assurance_level: AssuranceLevel,
pub evidential_interval: (f32, f32),
pub lineage: Option<(TheoryLineage, String)>,
pub empirical_anchors: Vec<String>,
pub residual_chi_squared: f64,
pub applicability: ApplicabilityEnvelope,
pub signature: Vec<u8>,
}Expand description
A theory package — a signed, classified law with provenance (OCS §11.1).
Fields§
§theory_id: String§name: String§nature: LawNature§assurance_level: AssuranceLevel§evidential_interval: (f32, f32)Evidential interval (μ: support, λ: refutation) in E_τ
lineage: Option<(TheoryLineage, String)>§empirical_anchors: Vec<String>§residual_chi_squared: f64§applicability: ApplicabilityEnvelope§signature: Vec<u8>Implementations§
Source§impl TheoryPackage
impl TheoryPackage
Sourcepub fn new(
id: &str,
name: &str,
author_did: &str,
nature: LawNature,
assurance: AssuranceLevel,
) -> Self
pub fn new( id: &str, name: &str, author_did: &str, nature: LawNature, assurance: AssuranceLevel, ) -> Self
Create a new theory package.
Sourcepub fn with_evidence(self, mu: f32, lambda: f32) -> Self
pub fn with_evidence(self, mu: f32, lambda: f32) -> Self
Set evidential interval (μ, λ).
Sourcepub fn with_anchor(self, iri: &str) -> Self
pub fn with_anchor(self, iri: &str) -> Self
Add an empirical anchor IRI.
Sourcepub fn with_chi_squared(self, chi2: f64) -> Self
pub fn with_chi_squared(self, chi2: f64) -> Self
Set residual chi-squared.
Sourcepub fn with_lineage(self, relation: TheoryLineage, target: &str) -> Self
pub fn with_lineage(self, relation: TheoryLineage, target: &str) -> Self
Set lineage.
Sourcepub fn is_empirically_calibrated(&self) -> bool
pub fn is_empirically_calibrated(&self) -> bool
Whether this theory is empirically calibrated (A3+).
Sourcepub fn is_fictional(&self) -> bool
pub fn is_fictional(&self) -> bool
Whether this theory is fictional.
Trait Implementations§
Source§impl Clone for TheoryPackage
impl Clone for TheoryPackage
Auto Trait Implementations§
impl Freeze for TheoryPackage
impl RefUnwindSafe for TheoryPackage
impl Send for TheoryPackage
impl Sync for TheoryPackage
impl Unpin for TheoryPackage
impl UnsafeUnpin for TheoryPackage
impl UnwindSafe for TheoryPackage
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