pub struct VariableResult {
pub name: String,
pub states: Vec<String>,
pub probabilities: Vec<f64>,
pub most_likely: String,
pub max_probability: f64,
}Expand description
Query result for a variable
Fields§
§name: StringVariable name
states: Vec<String>State names
probabilities: Vec<f64>Probability for each state
most_likely: StringMost likely state
max_probability: f64Probability of most likely state
Implementations§
Source§impl VariableResult
impl VariableResult
Sourcepub fn get_probability(&self, state: &str) -> Option<f64>
pub fn get_probability(&self, state: &str) -> Option<f64>
Get probability for a specific state
Trait Implementations§
Source§impl Clone for VariableResult
impl Clone for VariableResult
Source§fn clone(&self) -> VariableResult
fn clone(&self) -> VariableResult
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 VariableResult
impl Debug for VariableResult
Source§impl<'de> Deserialize<'de> for VariableResult
impl<'de> Deserialize<'de> for VariableResult
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 VariableResult
impl RefUnwindSafe for VariableResult
impl Send for VariableResult
impl Sync for VariableResult
impl Unpin for VariableResult
impl UnsafeUnpin for VariableResult
impl UnwindSafe for VariableResult
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