Struct rand_simple::HalfCauchy
source · pub struct HalfCauchy { /* private fields */ }Expand description
半コーシー分布を計算する構造体
使用例 1 (new関数)
use rand_simple::HalfCauchy;
let half_cauchy = HalfCauchy::new(1192u32, 765u32);
let next = half_cauchy.sample(); // 尺度母数 θ = 1の標準半コーシー分布
println!("乱数: {}", next); // 0.9999951805774843f64使用例 2 (マクロ・引数有り)
use rand_simple::create_half_cauchy;
let half_cauchy = create_half_cauchy!(1192u32, 765u32);
let next = half_cauchy.sample(); // 尺度母数 θ = 1の標準半コーシー分布
println!("乱数: {}", next); // 0.9999951805774843f64使用例 3 (マクロ・引数無し)
use rand_simple::create_half_cauchy;
let half_cauchy = create_half_cauchy!();
let next = half_cauchy.sample(); // 尺度母数 θ = 1の標準半コーシー分布
println!("乱数: {}", next); // 値不明Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HalfCauchy
impl Send for HalfCauchy
impl !Sync for HalfCauchy
impl Unpin for HalfCauchy
impl UnwindSafe for HalfCauchy
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