@@ -115,7 +115,10 @@ struct GammaLargeShape<N> {
115115}
116116
117117impl < N : Float > Gamma < N >
118- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
118+ where
119+ StandardNormal : Distribution < N > ,
120+ Exp1 : Distribution < N > ,
121+ Open01 : Distribution < N > ,
119122{
120123 /// Construct an object representing the `Gamma(shape, scale)`
121124 /// distribution.
@@ -140,7 +143,9 @@ where StandardNormal: Distribution<N>, Exp1: Distribution<N>, Open01: Distributi
140143}
141144
142145impl < N : Float > GammaSmallShape < N >
143- where StandardNormal : Distribution < N > , Open01 : Distribution < N >
146+ where
147+ StandardNormal : Distribution < N > ,
148+ Open01 : Distribution < N > ,
144149{
145150 fn new_raw ( shape : N , scale : N ) -> GammaSmallShape < N > {
146151 GammaSmallShape {
@@ -151,7 +156,9 @@ where StandardNormal: Distribution<N>, Open01: Distribution<N>
151156}
152157
153158impl < N : Float > GammaLargeShape < N >
154- where StandardNormal : Distribution < N > , Open01 : Distribution < N >
159+ where
160+ StandardNormal : Distribution < N > ,
161+ Open01 : Distribution < N > ,
155162{
156163 fn new_raw ( shape : N , scale : N ) -> GammaLargeShape < N > {
157164 let d = shape - N :: from ( 1. / 3. ) ;
@@ -164,7 +171,10 @@ where StandardNormal: Distribution<N>, Open01: Distribution<N>
164171}
165172
166173impl < N : Float > Distribution < N > for Gamma < N >
167- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
174+ where
175+ StandardNormal : Distribution < N > ,
176+ Exp1 : Distribution < N > ,
177+ Open01 : Distribution < N > ,
168178{
169179 fn sample < R : Rng + ?Sized > ( & self , rng : & mut R ) -> N {
170180 match self . repr {
@@ -175,7 +185,9 @@ where StandardNormal: Distribution<N>, Exp1: Distribution<N>, Open01: Distributi
175185 }
176186}
177187impl < N : Float > Distribution < N > for GammaSmallShape < N >
178- where StandardNormal : Distribution < N > , Open01 : Distribution < N >
188+ where
189+ StandardNormal : Distribution < N > ,
190+ Open01 : Distribution < N > ,
179191{
180192 fn sample < R : Rng + ?Sized > ( & self , rng : & mut R ) -> N {
181193 let u: N = rng. sample ( Open01 ) ;
@@ -184,7 +196,9 @@ where StandardNormal: Distribution<N>, Open01: Distribution<N>
184196 }
185197}
186198impl < N : Float > Distribution < N > for GammaLargeShape < N >
187- where StandardNormal : Distribution < N > , Open01 : Distribution < N >
199+ where
200+ StandardNormal : Distribution < N > ,
201+ Open01 : Distribution < N > ,
188202{
189203 fn sample < R : Rng + ?Sized > ( & self , rng : & mut R ) -> N {
190204 // Marsaglia & Tsang method, 2000
@@ -259,7 +273,10 @@ enum ChiSquaredRepr<N> {
259273}
260274
261275impl < N : Float > ChiSquared < N >
262- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
276+ where
277+ StandardNormal : Distribution < N > ,
278+ Exp1 : Distribution < N > ,
279+ Open01 : Distribution < N > ,
263280{
264281 /// Create a new chi-squared distribution with degrees-of-freedom
265282 /// `k`.
@@ -276,7 +293,10 @@ where StandardNormal: Distribution<N>, Exp1: Distribution<N>, Open01: Distributi
276293 }
277294}
278295impl < N : Float > Distribution < N > for ChiSquared < N >
279- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
296+ where
297+ StandardNormal : Distribution < N > ,
298+ Exp1 : Distribution < N > ,
299+ Open01 : Distribution < N > ,
280300{
281301 fn sample < R : Rng + ?Sized > ( & self , rng : & mut R ) -> N {
282302 match self . repr {
@@ -335,7 +355,10 @@ impl fmt::Display for FisherFError {
335355impl error:: Error for FisherFError { }
336356
337357impl < N : Float > FisherF < N >
338- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
358+ where
359+ StandardNormal : Distribution < N > ,
360+ Exp1 : Distribution < N > ,
361+ Open01 : Distribution < N > ,
339362{
340363 /// Create a new `FisherF` distribution, with the given parameter.
341364 pub fn new ( m : N , n : N ) -> Result < FisherF < N > , FisherFError > {
@@ -354,7 +377,10 @@ where StandardNormal: Distribution<N>, Exp1: Distribution<N>, Open01: Distributi
354377 }
355378}
356379impl < N : Float > Distribution < N > for FisherF < N >
357- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
380+ where
381+ StandardNormal : Distribution < N > ,
382+ Exp1 : Distribution < N > ,
383+ Open01 : Distribution < N > ,
358384{
359385 fn sample < R : Rng + ?Sized > ( & self , rng : & mut R ) -> N {
360386 self . numer . sample ( rng) / self . denom . sample ( rng) * self . dof_ratio
@@ -380,7 +406,10 @@ pub struct StudentT<N> {
380406}
381407
382408impl < N : Float > StudentT < N >
383- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
409+ where
410+ StandardNormal : Distribution < N > ,
411+ Exp1 : Distribution < N > ,
412+ Open01 : Distribution < N > ,
384413{
385414 /// Create a new Student t distribution with `n` degrees of
386415 /// freedom.
@@ -392,7 +421,10 @@ where StandardNormal: Distribution<N>, Exp1: Distribution<N>, Open01: Distributi
392421 }
393422}
394423impl < N : Float > Distribution < N > for StudentT < N >
395- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
424+ where
425+ StandardNormal : Distribution < N > ,
426+ Exp1 : Distribution < N > ,
427+ Open01 : Distribution < N > ,
396428{
397429 fn sample < R : Rng + ?Sized > ( & self , rng : & mut R ) -> N {
398430 let norm: N = rng. sample ( StandardNormal ) ;
@@ -438,7 +470,10 @@ impl fmt::Display for BetaError {
438470impl error:: Error for BetaError { }
439471
440472impl < N : Float > Beta < N >
441- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
473+ where
474+ StandardNormal : Distribution < N > ,
475+ Exp1 : Distribution < N > ,
476+ Open01 : Distribution < N > ,
442477{
443478 /// Construct an object representing the `Beta(alpha, beta)`
444479 /// distribution.
@@ -453,7 +488,10 @@ where StandardNormal: Distribution<N>, Exp1: Distribution<N>, Open01: Distributi
453488}
454489
455490impl < N : Float > Distribution < N > for Beta < N >
456- where StandardNormal : Distribution < N > , Exp1 : Distribution < N > , Open01 : Distribution < N >
491+ where
492+ StandardNormal : Distribution < N > ,
493+ Exp1 : Distribution < N > ,
494+ Open01 : Distribution < N > ,
457495{
458496 fn sample < R : Rng + ?Sized > ( & self , rng : & mut R ) -> N {
459497 let x = self . gamma_a . sample ( rng) ;
0 commit comments