Skip to main content

standard_rand

Function standard_rand 

Source
pub fn standard_rand<T: FloatExt + SampleUniform>(
    alpha: T,
    beta: T,
) -> XResult<T>
where Exp1: Distribution<T>,
Expand description

Sample the standard Lévy stable distribution random number

§Arguments

  • alpha - The index of stability, must be in the range (0, 2].
  • beta - The skewness parameter, must be in the range [-1, 1].

§Example

use diffusionx::random::stable::standard_rand;

let alpha = 0.7;
let beta = 1.0;
let r = standard_rand(alpha, beta).unwrap();
println!("r: {}", r);