3333//!
3434//! The following are re-exported:
3535//!
36- //! - The [`Distribution`] trait and [`DistIter `] helper type
36+ //! - The [`Distribution`] trait and [`Iter `] helper type
3737//! - The [`StandardUniform`], [`Alphanumeric`], [`Uniform`], [`OpenClosed01`],
38- //! [`Open01`], [`Bernoulli`], and [`WeightedIndex`] distributions
38+ //! [`Open01`], [`Bernoulli`] distributions
39+ //! - The [`weighted`] module
3940//!
4041//! ## Distributions
4142//!
7677//! - [`UnitBall`] distribution
7778//! - [`UnitCircle`] distribution
7879//! - [`UnitDisc`] distribution
79- //! - Alternative implementations for weighted index sampling
80- //! - [`WeightedAliasIndex`] distribution
81- //! - [`WeightedTreeIndex`] distribution
8280//! - Misc. distributions
8381//! - [`InverseGaussian`] distribution
8482//! - [`NormalInverseGaussian`] distribution
@@ -94,7 +92,7 @@ extern crate std;
9492use rand:: Rng ;
9593
9694pub use rand:: distr:: {
97- uniform, Alphanumeric , Bernoulli , BernoulliError , DistIter , Distribution , Open01 , OpenClosed01 ,
95+ uniform, Alphanumeric , Bernoulli , BernoulliError , Distribution , Iter , Open01 , OpenClosed01 ,
9896 StandardUniform , Uniform ,
9997} ;
10098
@@ -128,16 +126,13 @@ pub use self::unit_sphere::UnitSphere;
128126pub use self :: weibull:: { Error as WeibullError , Weibull } ;
129127pub use self :: zeta:: { Error as ZetaError , Zeta } ;
130128pub use self :: zipf:: { Error as ZipfError , Zipf } ;
131- #[ cfg( feature = "alloc" ) ]
132- pub use rand:: distr:: { WeightError , WeightedIndex } ;
133129pub use student_t:: StudentT ;
134- #[ cfg( feature = "alloc" ) ]
135- pub use weighted_alias:: WeightedAliasIndex ;
136- #[ cfg( feature = "alloc" ) ]
137- pub use weighted_tree:: WeightedTreeIndex ;
138130
139131pub use num_traits;
140132
133+ #[ cfg( feature = "alloc" ) ]
134+ pub mod weighted;
135+
141136#[ cfg( test) ]
142137#[ macro_use]
143138mod test {
@@ -189,11 +184,6 @@ mod test {
189184 }
190185}
191186
192- #[ cfg( feature = "alloc" ) ]
193- pub mod weighted_alias;
194- #[ cfg( feature = "alloc" ) ]
195- pub mod weighted_tree;
196-
197187mod beta;
198188mod binomial;
199189mod cauchy;
0 commit comments