fn rescale_weight(w: f64) -> u8
Rescale weight from [0,1] to u8 [1,255], with 0 = invalid.
Matches ROMEO.jl convention: valid edges always have weight ≥ 1.