pub enum APF<F, R> where
F: Float + SampleUniform,
R: Rng, {
Metropolis,
Custom {
f: fn(diff: F, t: F, uni: &Uniform<F>, rng: &mut R) -> bool,
},
}
Expand description
Acceptance probability function
Variants
Metropolis
Metropolis criterion:
$ P(\Delta f, t) = \begin{cases} 1, & if \; \Delta f \leqslant 0; \\ \min(e^{- \Delta f / t}, 1), & if \; \Delta f \gt 0 \end{cases} $
Custom
Custom: choose your own!
Implementations
Auto Trait Implementations
impl<F, R> RefUnwindSafe for APF<F, R>
impl<F, R> Send for APF<F, R>
impl<F, R> Sync for APF<F, R>
impl<F, R> Unpin for APF<F, R>
impl<F, R> UnwindSafe for APF<F, R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more