(hist: &'hist mut [HistItem])
| 27 | |
| 28 | impl<'hist> MBox<'hist> { |
| 29 | pub fn new(hist: &'hist mut [HistItem]) -> Self { |
| 30 | let weight_sum = hist.iter().map(|item| { |
| 31 | debug_assert!(item.adjusted_weight.is_finite()); |
| 32 | debug_assert!(item.adjusted_weight > 0.); |
| 33 | f64::from(item.adjusted_weight) |
| 34 | }).sum(); |
| 35 | Self::new_inner(hist, weight_sum, weighed_average_color(hist)) |
| 36 | } |
| 37 | |
| 38 | fn from_split(hist: &'hist mut [HistItem], adjusted_weight_sum: f64) -> Self { |
| 39 | debug_assert!(!hist.is_empty()); |
nothing calls this directly
no test coverage detected