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