Skip to content

Commit

Permalink
Add WeightedIndexTree to dist_randr (#1372)
Browse files Browse the repository at this point in the history
Add WeightedIndexTree to rand_distr

Co-authored-by: xmakro <makro@>
  • Loading branch information
xmakro committed Feb 8, 2024
1 parent 1f4507a commit f827c00
Show file tree
Hide file tree
Showing 3 changed files with 433 additions and 23 deletions.
9 changes: 8 additions & 1 deletion rand_distr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@
//! - [`UnitBall`] distribution
//! - [`UnitCircle`] distribution
//! - [`UnitDisc`] distribution
//! - Alternative implementation for weighted index sampling
//! - Alternative implementations for weighted index sampling
//! - [`WeightedAliasIndex`] distribution
//! - [`WeightedTreeIndex`] distribution
//! - Misc. distributions
//! - [`InverseGaussian`] distribution
//! - [`NormalInverseGaussian`] distribution
Expand Down Expand Up @@ -133,6 +134,9 @@ pub use rand::distributions::{WeightedError, WeightedIndex};
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
pub use weighted_alias::WeightedAliasIndex;
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
pub use weighted_tree::WeightedTreeIndex;

pub use num_traits;

Expand Down Expand Up @@ -186,6 +190,9 @@ mod test {
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
pub mod weighted_alias;
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
pub mod weighted_tree;

mod binomial;
mod cauchy;
Expand Down

0 comments on commit f827c00

Please sign in to comment.