pub struct ExposureAccumulator { /* private fields */ }Expand description
Per-history accumulation of the deposit in each configured volume.
Call begin_history, then
deposit for every deposit, then
end_history.
Implementations§
Source§impl ExposureAccumulator
impl ExposureAccumulator
Sourcepub fn new(config: ExposureConfig) -> Result<Self, ExposureError>
pub fn new(config: ExposureConfig) -> Result<Self, ExposureError>
Empty accumulator.
Sourcepub fn config(&self) -> &ExposureConfig
pub fn config(&self) -> &ExposureConfig
The configuration.
Sourcepub fn begin_history(&mut self, index: u64, start_yz: [f64; 2])
pub fn begin_history(&mut self, index: u64, start_yz: [f64; 2])
Starts history index of a primary starting at lateral position
start_yz (m).
Sourcepub fn deposit(&mut self, pos: [f64; 3], e: f64)
pub fn deposit(&mut self, pos: [f64; 3], e: f64)
A deposit of e eV at pos (m) in the current history.
Sourcepub fn end_history(&mut self)
pub fn end_history(&mut self)
Ends the current history.
Sourcepub fn report(&self) -> ExposureReport
pub fn report(&self) -> ExposureReport
The per-volume results.
Trait Implementations§
Source§impl Clone for ExposureAccumulator
impl Clone for ExposureAccumulator
Source§fn clone(&self) -> ExposureAccumulator
fn clone(&self) -> ExposureAccumulator
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 ExposureAccumulator
impl Debug for ExposureAccumulator
Source§impl PartialEq for ExposureAccumulator
impl PartialEq for ExposureAccumulator
impl StructuralPartialEq for ExposureAccumulator
Auto Trait Implementations§
impl Freeze for ExposureAccumulator
impl RefUnwindSafe for ExposureAccumulator
impl Send for ExposureAccumulator
impl Sync for ExposureAccumulator
impl Unpin for ExposureAccumulator
impl UnsafeUnpin for ExposureAccumulator
impl UnwindSafe for ExposureAccumulator
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,
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