@@ -51,10 +51,12 @@ use super::{Distribution, Exp};
51
51
/// for Generating Gamma Variables" *ACM Trans. Math. Softw.* 26, 3
52
52
/// (September 2000),
53
53
/// 363-372. DOI:[10.1145/358407.358414](http://doi.acm.org/10.1145/358407.358414)
54
+ #[ derive( Copy ) ]
54
55
pub struct Gamma {
55
56
repr : GammaRepr ,
56
57
}
57
58
59
+ #[ derive( Copy ) ]
58
60
enum GammaRepr {
59
61
Large ( GammaLargeShape ) ,
60
62
One ( Exp ) ,
@@ -75,6 +77,7 @@ enum GammaRepr {
75
77
///
76
78
/// See `Gamma` for sampling from a Gamma distribution with general
77
79
/// shape parameters.
80
+ #[ derive( Copy ) ]
78
81
struct GammaSmallShape {
79
82
inv_shape : f64 ,
80
83
large_shape : GammaLargeShape
@@ -84,6 +87,7 @@ struct GammaSmallShape {
84
87
///
85
88
/// See `Gamma` for sampling from a Gamma distribution with general
86
89
/// shape parameters.
90
+ #[ derive( Copy ) ]
87
91
struct GammaLargeShape {
88
92
scale : f64 ,
89
93
c : f64 ,
@@ -182,10 +186,12 @@ impl Distribution<f64> for GammaLargeShape {
182
186
/// let v = chi.sample(&mut rand::thread_rng());
183
187
/// println!("{} is from a χ²(11) distribution", v)
184
188
/// ```
189
+ #[ derive( Copy ) ]
185
190
pub struct ChiSquared {
186
191
repr : ChiSquaredRepr ,
187
192
}
188
193
194
+ #[ derive( Copy ) ]
189
195
enum ChiSquaredRepr {
190
196
// k == 1, Gamma(alpha, ..) is particularly slow for alpha < 1,
191
197
// e.g. when alpha = 1/2 as it would be for this case, so special-
@@ -235,6 +241,7 @@ impl Distribution<f64> for ChiSquared {
235
241
/// let v = f.sample(&mut rand::thread_rng());
236
242
/// println!("{} is from an F(2, 32) distribution", v)
237
243
/// ```
244
+ #[ derive( Copy ) ]
238
245
pub struct FisherF {
239
246
numer : ChiSquared ,
240
247
denom : ChiSquared ,
@@ -275,6 +282,7 @@ impl Distribution<f64> for FisherF {
275
282
/// let v = t.sample(&mut rand::thread_rng());
276
283
/// println!("{} is from a t(11) distribution", v)
277
284
/// ```
285
+ #[ derive( Copy ) ]
278
286
pub struct StudentT {
279
287
chi : ChiSquared ,
280
288
dof : f64
0 commit comments