Skip to main content

weights_moved

Function weights_moved 

Source
fn weights_moved(
    before: &WeightedCollection<ValidatedPath>,
    after: &WeightedCollection<ValidatedPath>,
) -> bool
Expand description

Whether re-weighting would send a materially different share of the draws somewhere else.

Shares rather than raw weights, because the draw normalises over the collection: every weight halving changes nothing about where traffic goes. Callers use this to decide whether a re-plan achieved anything, and a re-plan that moved nothing is a reason not to act on it – so answering “yes” by default would defeat the check it exists for.