fn rescale_weight(w: f64) -> u8Expand description
Rescale a weight in [0, 1] (1 best) to the queue priority, as ROMEO.jl bins it.
ROMEO.jl’s rescale (src/weights.jl:139-146, 08776d4) maps w to the bin
max(round((1 − w)·255), 1) (1 best, 255 worst, Julia’s round-half-to-even) and anything
outside [0, 1] to 0 (invalid). Here the priority is 256 − bin, so 255 is best, 1 worst
and 0 invalid, with exactly ROMEO.jl’s bins (a weight of 0 is the worst valid edge, as there).
The bins decide the growth order, so they must be ROMEO.jl’s for the same result.