Struct lattice_qcd_rs::simulation::monte_carlo::metropolis_hastings::MetropolisHastingsDiagnostic
source · pub struct MetropolisHastingsDiagnostic { /* private fields */ }
Expand description
Metropolis Hastings algorithm with diagnostics. Very slow, use MetropolisHastingsDeltaDiagnostic
instead.
Similar to MetropolisHastingsDiagnostic
but with diagnostic information.
Note that this method does not do a sweep but change random link matrix,
for a sweep there is super::MetropolisHastingsSweep
.
Example
see example of super::McWrapper
Implementations§
source§impl MetropolisHastingsDiagnostic
impl MetropolisHastingsDiagnostic
sourcepub fn new(number_of_update: usize, spread: Real) -> Option<Self>
pub fn new(number_of_update: usize, spread: Real) -> Option<Self>
spread
should be between 0 and 1 both not included and number_of_update should be greater
than 0. 0.1_f64
is a good choice for this parameter.
number_of_update
is the number of times a link matrix is randomly changed.
spread
is the spread factor for the random matrix change
( used in su3::random_su3_close_to_unity
).
sourcepub const fn prob_replace_last(&self) -> Real
pub const fn prob_replace_last(&self) -> Real
Get the last probably of acceptance of the random change.
sourcepub const fn has_replace_last(&self) -> bool
pub const fn has_replace_last(&self) -> bool
Get if last step has accepted the replacement.
sourcepub const fn number_of_update(&self) -> usize
pub const fn number_of_update(&self) -> usize
Get the number of updates per steps.
Trait Implementations§
source§impl Clone for MetropolisHastingsDiagnostic
impl Clone for MetropolisHastingsDiagnostic
source§fn clone(&self) -> MetropolisHastingsDiagnostic
fn clone(&self) -> MetropolisHastingsDiagnostic
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MetropolisHastingsDiagnostic
impl Debug for MetropolisHastingsDiagnostic
source§impl<'de> Deserialize<'de> for MetropolisHastingsDiagnostic
impl<'de> Deserialize<'de> for MetropolisHastingsDiagnostic
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>,
source§impl<State, const D: usize> MonteCarloDefault<State, D> for MetropolisHastingsDiagnosticwhere
State: LatticeState<D> + LatticeStateNew<D>,
impl<State, const D: usize> MonteCarloDefault<State, D> for MetropolisHastingsDiagnosticwhere State: LatticeState<D> + LatticeStateNew<D>,
§type Error = <State as LatticeStateNew<D>>::Error
type Error = <State as LatticeStateNew<D>>::Error
source§fn potential_next_element<Rng>(
&mut self,
state: &State,
rng: &mut Rng
) -> Result<State, Self::Error>where
Rng: Rng + ?Sized,
fn potential_next_element<Rng>( &mut self, state: &State, rng: &mut Rng ) -> Result<State, Self::Error>where Rng: Rng + ?Sized,
source§impl PartialEq<MetropolisHastingsDiagnostic> for MetropolisHastingsDiagnostic
impl PartialEq<MetropolisHastingsDiagnostic> for MetropolisHastingsDiagnostic
source§fn eq(&self, other: &MetropolisHastingsDiagnostic) -> bool
fn eq(&self, other: &MetropolisHastingsDiagnostic) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for MetropolisHastingsDiagnostic
impl StructuralPartialEq for MetropolisHastingsDiagnostic
Auto Trait Implementations§
impl RefUnwindSafe for MetropolisHastingsDiagnostic
impl Send for MetropolisHastingsDiagnostic
impl Sync for MetropolisHastingsDiagnostic
impl Unpin for MetropolisHastingsDiagnostic
impl UnwindSafe for MetropolisHastingsDiagnostic
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.