Update the `self.max` field, based on the old word index of `self.max`.
(&mut self, word_of_old_max: usize)
| 380 | |
| 381 | /// Update the `self.max` field, based on the old word index of `self.max`. |
| 382 | fn update_max(&mut self, word_of_old_max: usize) { |
| 383 | self.max = self.elems[0..word_of_old_max + 1] |
| 384 | .iter() |
| 385 | .enumerate() |
| 386 | .rev() |
| 387 | .filter_map(|(word, sub)| { |
| 388 | let bit = sub.max()?; |
| 389 | Some(u32::try_from(Self::elem(word, bit)).unwrap()) |
| 390 | }) |
| 391 | .next(); |
| 392 | } |
| 393 | |
| 394 | /// Get the largest value in this set, or `None` if this set is empty. |
| 395 | /// |