From 164b3ab141bb0d8a62ec5f1c362fa813d0ab133e Mon Sep 17 00:00:00 2001 From: zroug <37004975+zroug@users.noreply.github.com> Date: Fri, 15 Feb 2019 17:00:52 +0100 Subject: [PATCH] Added documentation for methods of `AliasMethodWeight` --- src/distributions/weighted.rs | 4 ++++ 1 file changed, 4 insertions(+) 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; }