Skip to content

Commit

Permalink
Added documentation for methods of AliasMethodWeight
Browse files Browse the repository at this point in the history
  • Loading branch information
zroug committed Feb 15, 2019
1 parent 53ce889 commit 164b3ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/distributions/weighted.rs
Expand Up @@ -410,9 +410,13 @@ pub trait AliasMethodWeight:
+ DivAssign
+ Sum
{
/// Maximum number representable by `Self`.
const MAX: Self;

/// Element of `Self` equivalent to 0.
const ZERO: Self;

/// Converts an [`usize`] to a `Self`, rounding if necessary.
fn try_from_usize_lossy(n: usize) -> Option<Self>;
}

Expand Down

0 comments on commit 164b3ab

Please sign in to comment.