pub struct StateBar {
pub name: String,
pub p: f64,
pub prior: Option<f64>,
pub text: String,
pub observed: bool,
}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.
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 StateBar
impl Sync for StateBar
impl Unpin for StateBar
impl UnsafeUnpin for StateBar
impl UnwindSafe for StateBar
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