Struct rand_simple::Levy
source · pub struct Levy { /* private fields */ }Expand description
レヴィ分布
使用例
let mut levy = rand_simple::Levy::new([1192_u32, 765_u32]);
println!("位置母数 μ = 0, 尺度母数 θ = 1 の標準レヴィ分布に従う乱数を生成する -> {}", levy.sample());
// 確率変数のパラメータを変更する場合
let location: f64 = -2_f64;
let scale: f64 = 1.5_f64;
let result: Result<(f64, f64), &str> = levy.try_set_params(location, scale);
println!("位置母数 μ = {}, 尺度母数 θ = {} のレヴィ分布に従う乱数を生成する -> {}", location, scale, levy.sample());Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Levy
impl Send for Levy
impl Sync for Levy
impl Unpin for Levy
impl UnwindSafe for Levy
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