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