pub struct HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,{ /* private fields */ }
Expand description
Distribution for the norm of the SU2 adjoint to generate the HeatBathDistribution
with the parameter
param_exp = beta * sqrt(det(A))
.
With distribution dP(x) = dx \sqrt(1-x_0^2) e^{-2 param_exp x^2}
Example
use lattice_qcd_rs::error::ImplementationError;
use lattice_qcd_rs::statistics::HeatBathDistributionNorm;
use rand::{Rng, SeedableRng};
let mut rng = rand::rngs::StdRng::seed_from_u64(0);
let heat_bath = HeatBathDistributionNorm::new(0.5_f64)
.ok_or(ImplementationError::OptionWithUnexpectedNone)?;
let r_number = rng.sample(&heat_bath);
Implementations§
source§impl<T> HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Neg<Output = T> + Sub<T, Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<T> HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Neg<Output = T> + Sub<T, Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
Trait Implementations§
source§impl<T> Clone for HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Clone,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<T> Clone for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Clone, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
source§fn clone(&self) -> HeatBathDistributionNorm<T>
fn clone(&self) -> HeatBathDistributionNorm<T>
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<T> Debug for HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Debug,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<T> Debug for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Debug, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
source§impl<'de, T> Deserialize<'de> for HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Deserialize<'de>,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<'de, T> Deserialize<'de> for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Deserialize<'de>, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
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<T> Display for HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Neg<Output = T> + Sub<T, Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Display,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<T> Display for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Neg<Output = T> + Sub<T, Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Display, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
source§impl<T> Distribution<T> for HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Neg<Output = T> + Sub<T, Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<T> Distribution<T> for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Neg<Output = T> + Sub<T, Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
source§fn sample<R>(&self, rng: &mut R) -> Twhere
R: Rng + ?Sized,
fn sample<R>(&self, rng: &mut R) -> Twhere R: Rng + ?Sized,
Generate a random value of
T
, using rng
as the source of randomness.source§impl<T> Hash for HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Hash,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<T> Hash for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Hash, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
source§impl<T> PartialEq<HeatBathDistributionNorm<T>> for HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + PartialEq,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<T> PartialEq<HeatBathDistributionNorm<T>> for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + PartialEq, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
source§fn eq(&self, other: &HeatBathDistributionNorm<T>) -> bool
fn eq(&self, other: &HeatBathDistributionNorm<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for HeatBathDistributionNorm<T>where
T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Serialize,
OpenClosed01: Distribution<T>,
Uniform<T>: Distribution<T>,
impl<T> Serialize for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Serialize, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
impl<T> Copy for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Copy, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
impl<T> Eq for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd + Eq, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
impl<T> StructuralEq for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
impl<T> StructuralPartialEq for HeatBathDistributionNorm<T>where T: One + Div<T, Output = T> + Mul<T, Output = T> + Add<T, Output = T> + Sub<T, Output = T> + Neg<Output = T> + Float + FloatConst + Zero + SampleUniform + PartialOrd, OpenClosed01: Distribution<T>, Uniform<T>: Distribution<T>,
Auto Trait Implementations§
impl<T> RefUnwindSafe for HeatBathDistributionNorm<T>where T: RefUnwindSafe,
impl<T> Send for HeatBathDistributionNorm<T>where T: Send,
impl<T> Sync for HeatBathDistributionNorm<T>where T: Sync,
impl<T> Unpin for HeatBathDistributionNorm<T>where T: Unpin,
impl<T> UnwindSafe for HeatBathDistributionNorm<T>where T: 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.