Macro rand_simple::create_cauchy
source · macro_rules! create_cauchy { () => { ... }; ($seed_1: expr, $seed_2: expr) => { ... }; }
Expand description
コーシー分布
() =>- 乱数の種は自動生成($seed_1: expr, $seed_2: expr) =>- 乱数の種を指定する
使用例 1
let mut cauchy = rand_simple::create_cauchy!(1192u32, 765u32);
println!("位置母数 μ = 0, 尺度母数 θ = 1の標準コーシー分布に従う乱数を生成する -> {}", cauchy.sample());使用例 2
let mut cauchy = rand_simple::create_cauchy!();
println!("位置母数 μ = 0, 尺度母数 θ = 1の標準コーシー分布に従う乱数を生成する -> {}", cauchy.sample());