If this `clear_stats()` call was moved into `collect_stats()` (as called on the next line), then the stats member of `ExpandWeight` could be made `protected`, which is better encapsulation.  Also, it's then clearer that the stats are reset each time.