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 duplicate 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§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 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 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§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> 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> Freeze for HeatBathDistributionNorm<T>where
T: Freeze,
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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.