Struct rand_simple::Erlang
source · pub struct Erlang { /* private fields */ }Expand description
アーラン分布
使用例
let mut erlang = rand_simple::Erlang::new([1192u32, 765u32, 1543u32]);
println!("形状母数 r = 1, 尺度母数 θ = 1 の標準アーラン分布に従う乱数を生成する -> {}", erlang.sample());
// 確率変数のパラメータを変更する場合
let shape: i64 = 2_i64;
let scale: f64 = 1.5_f64;
let result: Result<(i64, f64), &str> = erlang.try_set_params(shape, scale);
println!("形状母数 r = {}, 尺度母数 θ = {} のアーラン分布に従う乱数を生成する -> {}", shape, scale, erlang.sample());Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Erlang
impl Send for Erlang
impl Sync for Erlang
impl Unpin for Erlang
impl UnwindSafe for Erlang
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