pub struct ReferenceIntervalWithSample<T, F>{
pub reference_interval: ReferenceInterval<T>,
pub mean: F,
pub standard_deviation: F,
pub normal: Normal<F>,
}
Expand description
ReferenceIntervalWithSample decorates a ReferenceInterval with a random sample function, suitable for generating plausible ReferenceInterval normal values.
Fields§
§reference_interval: ReferenceInterval<T>
§mean: F
§standard_deviation: F
§normal: Normal<F>
Implementations§
Source§impl<T, F> ReferenceIntervalWithSample<T, F>where
T: Add<Output = T> + Sub<Output = T> + Copy + Into<F>,
F: Float + NumCast,
StandardNormal: Distribution<F>,
impl<T, F> ReferenceIntervalWithSample<T, F>where
T: Add<Output = T> + Sub<Output = T> + Copy + Into<F>,
F: Float + NumCast,
StandardNormal: Distribution<F>,
Sourcepub fn new(reference_interval: ReferenceInterval<T>) -> Self
pub fn new(reference_interval: ReferenceInterval<T>) -> Self
The new function is a builder that calculates the resource interval mean and standard deviation, then creates a normal distribution that is ready for the random sample function.
Trait Implementations§
Source§impl<T, F> Distribution<F> for ReferenceIntervalWithSample<T, F>where
T: Add<Output = T> + Sub<Output = T> + Copy + Into<F>,
F: Float + NumCast,
StandardNormal: Distribution<F>,
Implement the typical rand sample function.
impl<T, F> Distribution<F> for ReferenceIntervalWithSample<T, F>where
T: Add<Output = T> + Sub<Output = T> + Copy + Into<F>,
F: Float + NumCast,
StandardNormal: Distribution<F>,
Implement the typical rand sample function.
Auto Trait Implementations§
impl<T, F> Freeze for ReferenceIntervalWithSample<T, F>
impl<T, F> RefUnwindSafe for ReferenceIntervalWithSample<T, F>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for ReferenceIntervalWithSample<T, F>
impl<T, F> Sync for ReferenceIntervalWithSample<T, F>
impl<T, F> Unpin for ReferenceIntervalWithSample<T, F>
impl<T, F> UnwindSafe for ReferenceIntervalWithSample<T, F>where
F: UnwindSafe,
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