#[non_exhaustive]pub enum StepOutcome {
Accepted,
RejectedProposal,
NoProposal,
}Expand description
Outcome of a completed Metropolis-Hastings step.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Accepted
A concrete proposal was accepted and committed.
RejectedProposal
A concrete proposal was produced and then rejected by the Metropolis-Hastings acceptance draw.
NoProposal
No concrete proposal was available, so the step was an ordinary self-loop without a Metropolis-Hastings acceptance draw.
Implementations§
Source§impl StepOutcome
impl StepOutcome
Sourcepub const fn is_accepted(self) -> bool
pub const fn is_accepted(self) -> bool
Whether this outcome accepted and committed a concrete proposal.
use markov_chain_monte_carlo::prelude::delayed::StepOutcome;
assert!(StepOutcome::Accepted.is_accepted());
assert!(!StepOutcome::RejectedProposal.is_accepted());
assert!(!StepOutcome::NoProposal.is_accepted());Sourcepub const fn has_proposal(self) -> bool
pub const fn has_proposal(self) -> bool
Whether this outcome includes a concrete proposal.
use markov_chain_monte_carlo::prelude::delayed::StepOutcome;
assert!(StepOutcome::Accepted.has_proposal());
assert!(StepOutcome::RejectedProposal.has_proposal());
assert!(!StepOutcome::NoProposal.has_proposal());Trait Implementations§
Source§impl Clone for StepOutcome
impl Clone for StepOutcome
Source§fn clone(&self) -> StepOutcome
fn clone(&self) -> StepOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StepOutcome
impl Debug for StepOutcome
Source§impl From<StepOutcome> for TraceStepOutcome
impl From<StepOutcome> for TraceStepOutcome
Source§fn from(outcome: StepOutcome) -> TraceStepOutcome
fn from(outcome: StepOutcome) -> TraceStepOutcome
Converts to this type from the input type.
Source§impl PartialEq for StepOutcome
impl PartialEq for StepOutcome
Source§fn eq(&self, other: &StepOutcome) -> bool
fn eq(&self, other: &StepOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for StepOutcome
impl Eq for StepOutcome
impl StructuralPartialEq for StepOutcome
Auto Trait Implementations§
impl Freeze for StepOutcome
impl RefUnwindSafe for StepOutcome
impl Send for StepOutcome
impl Sync for StepOutcome
impl Unpin for StepOutcome
impl UnsafeUnpin for StepOutcome
impl UnwindSafe for StepOutcome
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