pub struct ReflectedWeibull { /* private fields */ }Expand description
Reflected Weibull Distribution
§Example Usage
// Create an instance of the Reflected Weibull distribution with default parameters
let mut reflected_weibull = rand_simple::ReflectedWeibull::new(1192u32);
// The default parameters are:
// Shape = 1, Location = 0, Scale = 1
assert_eq!(format!("{reflected_weibull}"), "RWeibull(Shape parameter, Location Parameter, Scale parameter) = RWeibull(1, 0, 1)");
// Adjusting the parameters of the distribution:
let shape: f64 = 2f64; // The shape parameter, controlling the distribution's tail
let location: f64 = 3f64; // The location parameter, shifting the distribution
let scale: f64 = 1.5f64; // The scale parameter, stretching or compressing the distribution
let result: Result<(f64, f64, f64), &str> = reflected_weibull.try_set_params(shape, location, scale);
// After updating the parameters, verify the distribution's state
assert_eq!(format!("{reflected_weibull}"), "RWeibull(Shape parameter, Location Parameter, Scale parameter) = RWeibull(2, 3, 1.5)");Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReflectedWeibull
impl RefUnwindSafe for ReflectedWeibull
impl Send for ReflectedWeibull
impl Sync for ReflectedWeibull
impl Unpin for ReflectedWeibull
impl UnwindSafe for ReflectedWeibull
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