Struct flow_sdk::algorithms::secp256k1::rand::distributions::Cauchy [−][src]
pub struct Cauchy { /* fields omitted */ }
Expand description
The Cauchy distribution Cauchy(median, scale)
.
This distribution has a density function:
f(x) = 1 / (pi * scale * (1 + ((x - median) / scale)^2))
Example
use rand::distributions::{Cauchy, Distribution};
let cau = Cauchy::new(2.0, 5.0);
let v = cau.sample(&mut rand::thread_rng());
println!("{} is from a Cauchy(2, 5) 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 Cauchy
impl UnwindSafe for Cauchy
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