diff --git a/src/distributions/weighted.rs b/src/distributions/weighted.rs index 1a4451e88e1..0a09c698f9c 100644 --- a/src/distributions/weighted.rs +++ b/src/distributions/weighted.rs @@ -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; }