Struct rand_simple::PowerFunction
source · pub struct PowerFunction { /* private fields */ }Expand description
べき関数分布
使用例
let mut power_function = rand_simple::PowerFunction::new(1192u32);
println!("形状母数 1, 開区間(0, 1)のべき関数分布を返す -> {}", power_function.sample());
// 確率変数のパラメータを変更する場合
let shape: f64 = 2_f64;
let min: f64 = -1f64;
let max: f64 = 1f64;
let result: Result<(f64, f64, f64), &str> = power_function.try_set_params(shape,min, max);
println!("形状母数 {}, 開区間({}, {})のべき関数分布を生成する -> {}", shape, min, max, power_function.sample());Implementations§
source§impl PowerFunction
impl PowerFunction
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PowerFunction
impl Send for PowerFunction
impl Sync for PowerFunction
impl Unpin for PowerFunction
impl UnwindSafe for PowerFunction
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