Macro rand_simple::create_exponential
source · macro_rules! create_exponential { () => { ... }; ($seed: expr) => { ... }; }
Expand description
指数分布
() =>- 乱数の種は自動生成($seed: expr) =>- 乱数の種を指定する
使用例 1
let mut exponential = rand_simple::create_exponential!(1192u32);
println!("尺度母数 θ = 1の標準指数分布に従う乱数を生成する -> {}", exponential.sample());使用例 2
let mut exponential = rand_simple::create_exponential!();
println!("尺度母数 θ = 1の標準指数分布に従う乱数を生成する -> {}", exponential.sample());