Extracts the range of this uncertain quantity, depending on its distribution: - A [`Uniform`] distribution's range is simply its interval. - An [`Exponential`] distribution's range is `[offset, +∞)`. - A [`Gaussian`] distribution's range is unbounded. - A [`Bernoulli`] distribution's range is [`Interval::TRUE_OR_FALSE`], if `p` is neither `0` nor `1`. Otherwise, it is [`Interval::FALSE`] and [`Int
(&self)
| 182 | /// - A [`Generic`] distribution is unbounded by default, but more information |
| 183 | /// may be present. |
| 184 | pub fn range(&self) -> Result<Interval> { |
| 185 | match &self { |
| 186 | Uniform(u) => Ok(u.range().clone()), |
| 187 | Exponential(e) => e.range(), |
| 188 | Gaussian(g) => g.range(), |
| 189 | Bernoulli(b) => Ok(b.range()), |
| 190 | Generic(u) => Ok(u.range().clone()), |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | /// Returns the data type of the statistical parameters comprising this |
| 195 | /// distribution. |
no test coverage detected