Struct rand_simple::Levy
source · pub struct Levy { /* private fields */ }Expand description
レヴィ分布を計算する構造体
使用例 1 (new関数)
use rand_simple::Levy;
let levy = Levy::new(1192u32, 765u32);
let next = levy.sample(); // 位置母数 μ = 0, 尺度母数 θ = 1の標準レヴィ分布
println!("乱数: {}", next); // 0.15611801640551176f64使用例 2 (マクロ・引数有り)
use rand_simple::create_levy;
let levy = create_levy!(1192u32, 765u32);
let next = levy.sample(); // 位置母数 μ = 0, 尺度母数 θ = 1の標準レヴィ分布
println!("乱数: {}", next); // 0.15611801640551176f64使用例 3 (マクロ・引数無し)
use rand_simple::create_levy;
let levy = create_levy!();
let next = levy.sample(); // 位置母数 μ = 0, 尺度母数 θ = 1の標準レヴィ分布
println!("乱数: {}", next); // 値不明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