pub struct ExposureHistogram {
pub histories: u64,
pub zero_count: u64,
pub bin_width_ev: f64,
pub counts: Vec<u64>,
pub overflow_count: u64,
pub sum_x: f64,
pub sum_x2: f64,
pub sum_x3: f64,
pub sum_x4: f64,
}Expand description
The histogram of the per-electron deposit X in one volume, with exact
moment sums. Mergeable; see the module docs.
Fields§
§histories: u64Primary histories tallied.
zero_count: u64Histories with X = 0 exactly.
bin_width_ev: f64Bin width, eV.
counts: Vec<u64>Counts of (j-1) w < X <= j w, j = 1..=bins (index j-1).
overflow_count: u64Histories with X beyond the last edge (also counted in the last bin).
sum_x: f64Σ X, eV.
sum_x2: f64Σ X², eV².
sum_x3: f64Σ X³, eV³.
sum_x4: f64Σ X⁴, eV⁴.
Implementations§
Source§impl ExposureHistogram
impl ExposureHistogram
Sourcepub fn second_moment_ev2(&self) -> f64
pub fn second_moment_ev2(&self) -> f64
E[X²], eV².
Sourcepub fn mean_std_err_ev(&self) -> f64
pub fn mean_std_err_ev(&self) -> f64
Standard error of E[X]: sqrt((E[X²] - E[X]²)/(n-1)); 0 for n < 2.
Sourcepub fn second_moment_std_err_ev2(&self) -> f64
pub fn second_moment_std_err_ev2(&self) -> f64
Standard error of E[X²] from E[X⁴] - E[X²]².
Sourcepub fn zero_fraction(&self) -> f64
pub fn zero_fraction(&self) -> f64
Fraction of histories with X = 0.
Sourcepub fn compound_poisson(
&self,
lambda: f64,
request: &CompoundRequest,
) -> Result<CompoundPoisson, ExposureError>
pub fn compound_poisson( &self, lambda: f64, request: &CompoundRequest, ) -> Result<CompoundPoisson, ExposureError>
The compound-Poisson summary of S = X_1 + … + X_N, N ~ Poisson(λ),
for any λ, from this histogram alone (no rerun). See
the module docs.
Trait Implementations§
Source§impl Clone for ExposureHistogram
impl Clone for ExposureHistogram
Source§fn clone(&self) -> ExposureHistogram
fn clone(&self) -> ExposureHistogram
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExposureHistogram
impl Debug for ExposureHistogram
Source§impl<'de> Deserialize<'de> for ExposureHistogram
impl<'de> Deserialize<'de> for ExposureHistogram
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 PartialEq for ExposureHistogram
impl PartialEq for ExposureHistogram
Source§impl Serialize for ExposureHistogram
impl Serialize for ExposureHistogram
impl StructuralPartialEq for ExposureHistogram
Auto Trait Implementations§
impl Freeze for ExposureHistogram
impl RefUnwindSafe for ExposureHistogram
impl Send for ExposureHistogram
impl Sync for ExposureHistogram
impl Unpin for ExposureHistogram
impl UnsafeUnpin for ExposureHistogram
impl UnwindSafe for ExposureHistogram
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more