pub struct Prior {
pub mean: f32,
pub variance: f32,
pub reason: String,
}Expand description
Prior distribution for an axis.
Fields§
§mean: f32Prior mean (expected value before observation).
variance: f32Prior variance (uncertainty before observation).
reason: StringHuman-readable reason for this prior.
Implementations§
Source§impl Prior
impl Prior
Sourcepub fn from_value(
value: f32,
confidence: f32,
reason: impl Into<String>,
) -> Self
pub fn from_value( value: f32, confidence: f32, reason: impl Into<String>, ) -> Self
Create a prior from a specific value with given confidence.
Sourcepub fn biased_low(reason: impl Into<String>) -> Self
pub fn biased_low(reason: impl Into<String>) -> Self
Create a prior biased toward low values.
Sourcepub fn biased_high(reason: impl Into<String>) -> Self
pub fn biased_high(reason: impl Into<String>) -> Self
Create a prior biased toward high values.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Prior
impl<'de> Deserialize<'de> for Prior
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
Auto Trait Implementations§
impl Freeze for Prior
impl RefUnwindSafe for Prior
impl Send for Prior
impl Sync for Prior
impl Unpin for Prior
impl UnsafeUnpin for Prior
impl UnwindSafe for Prior
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