pub struct ProbabilityThreshold { /* private fields */ }Expand description
PBIL can be considered done when all probabilities are above this threshold or below the inverse.
Implementations§
Source§impl ProbabilityThreshold
impl ProbabilityThreshold
Sourcepub fn new(value: Probability) -> Result<Self, InvalidProbabilityThresholdError>
pub fn new(value: Probability) -> Result<Self, InvalidProbabilityThresholdError>
Return a new ‘ConvergedThreshold’ if given a valid value.
Sourcepub fn into_inner(self) -> Probability
pub fn into_inner(self) -> Probability
Unwrap ‘ConvergedThreshold’ into inner value.
Sourcepub fn upper_bound(&self) -> Probability
pub fn upper_bound(&self) -> Probability
Return the threshold upper bound.
Sourcepub fn lower_bound(&self) -> Probability
pub fn lower_bound(&self) -> Probability
Return the threshold lower bound.
Trait Implementations§
Source§impl Clone for ProbabilityThreshold
impl Clone for ProbabilityThreshold
Source§fn clone(&self) -> ProbabilityThreshold
fn clone(&self) -> ProbabilityThreshold
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 ProbabilityThreshold
impl Debug for ProbabilityThreshold
Source§impl Default for ProbabilityThreshold
impl Default for ProbabilityThreshold
Source§impl From<ProbabilityThreshold> for Probability
impl From<ProbabilityThreshold> for Probability
Source§fn from(x: ProbabilityThreshold) -> Self
fn from(x: ProbabilityThreshold) -> Self
Converts to this type from the input type.
Source§impl LowerBounded for ProbabilityThreshold
impl LowerBounded for ProbabilityThreshold
Source§impl Ord for ProbabilityThreshold
impl Ord for ProbabilityThreshold
Source§impl PartialEq for ProbabilityThreshold
impl PartialEq for ProbabilityThreshold
Source§impl PartialOrd for ProbabilityThreshold
impl PartialOrd for ProbabilityThreshold
Source§impl TryFrom<Probability> for ProbabilityThreshold
impl TryFrom<Probability> for ProbabilityThreshold
Source§type Error = InvalidProbabilityThresholdError
type Error = InvalidProbabilityThresholdError
The type returned in the event of a conversion error.
Source§impl UpperBounded for ProbabilityThreshold
impl UpperBounded for ProbabilityThreshold
impl Copy for ProbabilityThreshold
impl Eq for ProbabilityThreshold
Auto Trait Implementations§
impl Freeze for ProbabilityThreshold
impl RefUnwindSafe for ProbabilityThreshold
impl Send for ProbabilityThreshold
impl Sync for ProbabilityThreshold
impl Unpin for ProbabilityThreshold
impl UnwindSafe for ProbabilityThreshold
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