Struct lattice_qcd_rs::simulation::monte_carlo::metropolis_hastings::MetropolisHastingsDeltaDiagnostic
source · pub struct MetropolisHastingsDeltaDiagnostic<Rng: Rng> { /* private fields */ }
Expand description
Metropolis Hastings algorithm with diagnostics.
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
Implementations§
source§impl<Rng: Rng> MetropolisHastingsDeltaDiagnostic<Rng>
impl<Rng: Rng> MetropolisHastingsDeltaDiagnostic<Rng>
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 fn new(spread: Real, rng: Rng) -> Option<Self>
pub fn new(spread: Real, rng: Rng) -> Option<Self>
spread
should be between 0 and 1 both not included and number_of_update should be greater
than 0.
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
).
Trait Implementations§
source§impl<Rng: Rng> AsMut<Rng> for MetropolisHastingsDeltaDiagnostic<Rng>
impl<Rng: Rng> AsMut<Rng> for MetropolisHastingsDeltaDiagnostic<Rng>
source§impl<Rng: Rng> AsRef<Rng> for MetropolisHastingsDeltaDiagnostic<Rng>
impl<Rng: Rng> AsRef<Rng> for MetropolisHastingsDeltaDiagnostic<Rng>
source§impl<Rng: Clone + Rng> Clone for MetropolisHastingsDeltaDiagnostic<Rng>
impl<Rng: Clone + Rng> Clone for MetropolisHastingsDeltaDiagnostic<Rng>
source§fn clone(&self) -> MetropolisHastingsDeltaDiagnostic<Rng>
fn clone(&self) -> MetropolisHastingsDeltaDiagnostic<Rng>
Returns a copy 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<'de, Rng> Deserialize<'de> for MetropolisHastingsDeltaDiagnostic<Rng>where
Rng: Deserialize<'de> + Rng,
impl<'de, Rng> Deserialize<'de> for MetropolisHastingsDeltaDiagnostic<Rng>where Rng: Deserialize<'de> + Rng,
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<Rng, const D: usize> MonteCarlo<LatticeStateDefault<D>, D> for MetropolisHastingsDeltaDiagnostic<Rng>where
Rng: Rng,
impl<Rng, const D: usize> MonteCarlo<LatticeStateDefault<D>, D> for MetropolisHastingsDeltaDiagnostic<Rng>where Rng: Rng,
source§fn next_element(
&mut self,
state: LatticeStateDefault<D>
) -> Result<LatticeStateDefault<D>, Self::Error>
fn next_element( &mut self, state: LatticeStateDefault<D> ) -> Result<LatticeStateDefault<D>, Self::Error>
Do one Monte Carlo simulation step. Read more
source§impl<Rng: PartialEq + Rng> PartialEq<MetropolisHastingsDeltaDiagnostic<Rng>> for MetropolisHastingsDeltaDiagnostic<Rng>
impl<Rng: PartialEq + Rng> PartialEq<MetropolisHastingsDeltaDiagnostic<Rng>> for MetropolisHastingsDeltaDiagnostic<Rng>
source§fn eq(&self, other: &MetropolisHastingsDeltaDiagnostic<Rng>) -> bool
fn eq(&self, other: &MetropolisHastingsDeltaDiagnostic<Rng>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<Rng: Rng> StructuralPartialEq for MetropolisHastingsDeltaDiagnostic<Rng>
Auto Trait Implementations§
impl<Rng> RefUnwindSafe for MetropolisHastingsDeltaDiagnostic<Rng>where Rng: RefUnwindSafe,
impl<Rng> Send for MetropolisHastingsDeltaDiagnostic<Rng>where Rng: Send,
impl<Rng> Sync for MetropolisHastingsDeltaDiagnostic<Rng>where Rng: Sync,
impl<Rng> Unpin for MetropolisHastingsDeltaDiagnostic<Rng>where Rng: Unpin,
impl<Rng> UnwindSafe for MetropolisHastingsDeltaDiagnostic<Rng>where Rng: UnwindSafe,
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>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.