33
33
//!
34
34
//! The following are re-exported:
35
35
//!
36
- //! - The [`Distribution`] trait and [`DistIter `] helper type
36
+ //! - The [`Distribution`] trait and [`Iter `] helper type
37
37
//! - The [`StandardUniform`], [`Alphanumeric`], [`Uniform`], [`OpenClosed01`],
38
- //! [`Open01`], [`Bernoulli`], and [`WeightedIndex`] distributions
38
+ //! [`Open01`], [`Bernoulli`] distributions
39
+ //! - The [`weighted`] module
39
40
//!
40
41
//! ## Distributions
41
42
//!
76
77
//! - [`UnitBall`] distribution
77
78
//! - [`UnitCircle`] distribution
78
79
//! - [`UnitDisc`] distribution
79
- //! - Alternative implementations for weighted index sampling
80
- //! - [`WeightedAliasIndex`] distribution
81
- //! - [`WeightedTreeIndex`] distribution
82
80
//! - Misc. distributions
83
81
//! - [`InverseGaussian`] distribution
84
82
//! - [`NormalInverseGaussian`] distribution
@@ -94,7 +92,7 @@ extern crate std;
94
92
use rand:: Rng ;
95
93
96
94
pub use rand:: distr:: {
97
- uniform, Alphanumeric , Bernoulli , BernoulliError , DistIter , Distribution , Open01 , OpenClosed01 ,
95
+ uniform, Alphanumeric , Bernoulli , BernoulliError , Distribution , Iter , Open01 , OpenClosed01 ,
98
96
StandardUniform , Uniform ,
99
97
} ;
100
98
@@ -128,16 +126,13 @@ pub use self::unit_sphere::UnitSphere;
128
126
pub use self :: weibull:: { Error as WeibullError , Weibull } ;
129
127
pub use self :: zeta:: { Error as ZetaError , Zeta } ;
130
128
pub use self :: zipf:: { Error as ZipfError , Zipf } ;
131
- #[ cfg( feature = "alloc" ) ]
132
- pub use rand:: distr:: { WeightError , WeightedIndex } ;
133
129
pub use student_t:: StudentT ;
134
- #[ cfg( feature = "alloc" ) ]
135
- pub use weighted_alias:: WeightedAliasIndex ;
136
- #[ cfg( feature = "alloc" ) ]
137
- pub use weighted_tree:: WeightedTreeIndex ;
138
130
139
131
pub use num_traits;
140
132
133
+ #[ cfg( feature = "alloc" ) ]
134
+ pub mod weighted;
135
+
141
136
#[ cfg( test) ]
142
137
#[ macro_use]
143
138
mod test {
@@ -189,11 +184,6 @@ mod test {
189
184
}
190
185
}
191
186
192
- #[ cfg( feature = "alloc" ) ]
193
- pub mod weighted_alias;
194
- #[ cfg( feature = "alloc" ) ]
195
- pub mod weighted_tree;
196
-
197
187
mod beta;
198
188
mod binomial;
199
189
mod cauchy;
0 commit comments