pub struct StateBar {
pub name: String,
pub p: f64,
pub prior: Option<f64>,
pub text: String,
pub observed: bool,
pub was: Option<f64>,
}Expand description
One state of a discrete node: a row in its box with the state’s name, a bar for its probability and that probability as text, the prior as a faint bar behind it with a tick where it ends (Netica / GeNIe style).
Fields§
§name: String§p: f64The probability, 0..=1 (clamped).
prior: Option<f64>The probability before any evidence, 0..=1.
text: StringWhat the row says after the bar (e.g. 36%).
observed: boolThe observed state: its name in bold.
was: Option<f64>The probability before the last change (e.g. under the evidence as it
was), 0..=1: a ▲ / ▼ and the change in percentage points after the
probability (▲21), none for a change under half a point. Size the
box with states_box_with_deltas.
Trait Implementations§
impl StructuralPartialEq for StateBar
Auto Trait Implementations§
impl Forget for StateBar
impl Freeze for StateBar
impl Move for StateBar
impl RefUnwindSafe for StateBar
impl Send for StateBarwhere
RawVecInner: Send,
impl Sync for StateBarwhere
RawVecInner: Sync,
impl Unpin for StateBar
impl UnsafeUnpin for StateBar
impl UnwindSafe for StateBarwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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