Struct flow_sdk::algorithms::rand::distributions::Exp [−][src]
pub struct Exp { /* fields omitted */ }
Expand description
The exponential distribution Exp(lambda)
.
This distribution has density function: f(x) = lambda * exp(-lambda * x)
for x > 0
.
Note that Exp1
is an optimised implementation for lambda = 1
.
Example
use rand::distributions::{Exp, Distribution};
let exp = Exp::new(2.0);
let v = exp.sample(&mut rand::thread_rng());
println!("{} is from a Exp(2) distribution", v);
Implementations
Trait Implementations
Generate a random value of T
, using rng
as the source of randomness.
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
Auto Trait Implementations
impl RefUnwindSafe for Exp
impl UnwindSafe for Exp
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more