pub fn new(lambda : f64) -> Self {
        let c1 = lambda.exp_m1() / lambda;    // exp_m1 for numerical precision 
        let c2 = (2./(1. + (-lambda).exp())).ln()/ lambda;
        let c3 = (1. - (-lambda).exp()) / lambda;
        ExpRestricted01{lambda, c1, c2, c3, unit_range:Uniform::<f64>::new(0.,1.)}
    }
/// allocates a struct ExpRestricted01 for sampling an exponential law of parameter lambda, but restricted to [0,1.)]
allocates a struct ExpRestricted01 for sampling an exponential law of parameter lambda, but restricted to [0,1.)]
allocates a struct ExpRestricted01 for sampling an exponential law of parameter lambda but restricted to [ 0 1 . ) ]
pub fn new(lambda : f64) -> Self {
        let c1 = lambda.exp_m1() / lambda;    // exp_m1 for numerical precision 
        let c2 = (2./(1. + (-lambda).exp())).ln()/ lambda;
        let c3 = (1. - (-lambda).exp()) / lambda;
        ExpRestricted01{lambda, c1, c2, c3, unit_range:Uniform::<f64>::new(0.,1.)}
    }
pub fn new ( lambda : f64 ) -> Self { let c1 = lambda . exp_m1 ( ) / lambda ; // exp_m1 for numerical precision  let c2 = ( 2. / ( 1. + ( - lambda ) . exp ( ) ) ) . ln ( ) / lambda ; let c3 = ( 1. - ( - lambda ) . exp ( ) ) / lambda ; ExpRestricted01 { lambda , c1 , c2 , c3 , unit_range : Uniform :: < f64 > :: new ( 0. , 1. ) } }
allocates a struct ExpRestricted01 for sampling an exponential law of parameter lambda, but restricted to [0,1.)]
allocates a struct ExpRestricted01 for sampling an exponential law of parameter lambda but restricted to [ 0 1 . ) ]
lambda
f64