pub struct CredalSet { /* private fields */ }Expand description
Credal set: convex set of probability distributions.
Represented by extreme points (vertices) of the credal set.
Implementations§
Source§impl CredalSet
impl CredalSet
Sourcepub fn new(extreme_points: Vec<HashMap<String, f64>>) -> Self
pub fn new(extreme_points: Vec<HashMap<String, f64>>) -> Self
Create a credal set from extreme points.
Sourcepub fn precise(distribution: HashMap<String, f64>) -> Self
pub fn precise(distribution: HashMap<String, f64>) -> Self
Create a precise credal set (single distribution).
Sourcepub fn lower_prob(&self, event: &str) -> f64
pub fn lower_prob(&self, event: &str) -> f64
Get lower probability bound for an event.
Sourcepub fn upper_prob(&self, event: &str) -> f64
pub fn upper_prob(&self, event: &str) -> f64
Get upper probability bound for an event.
Sourcepub fn prob_interval(&self, event: &str) -> ProbabilityInterval
pub fn prob_interval(&self, event: &str) -> ProbabilityInterval
Get probability interval for an event.
Sourcepub fn is_precise(&self) -> bool
pub fn is_precise(&self) -> bool
Check if credal set is precise (single distribution).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CredalSet
impl RefUnwindSafe for CredalSet
impl Send for CredalSet
impl Sync for CredalSet
impl Unpin for CredalSet
impl UnwindSafe for CredalSet
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