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