Struct rand_simple::TDistribution
source · pub struct TDistribution { /* private fields */ }Expand description
t分布
使用例
let mut t = rand_simple::TDistribution::new([1192u32, 765u32, 1543u32, 2003u32, 1867u32]);
println!("初期設定の場合、自由度 1のt分布に従う乱数を返す -> {}", t.sample());
// 確率変数のパラメータを変更する場合
let degree_of_freedom: u64 = 3_u64;
let result: Result<u64, &str> = t.try_set_params(degree_of_freedom);
println!("自由度 {}の乱数を生成する -> {}", degree_of_freedom, t.sample());Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for TDistribution
impl Send for TDistribution
impl Sync for TDistribution
impl Unpin for TDistribution
impl UnwindSafe for TDistribution
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