Skip to main content

rank_by

Function rank_by 

Source
pub fn rank_by(found: &mut [Candidate], by: &[(Criterion, f64)])
Expand description

Ranks a search (catalog::rank: passing first, the others nearest to passing first) and orders the passing ones by by: the sum of each criterion’s weight times its figure over the best (lowest) figure of the passing ones, so that criteria of different units weigh as their weights say (a figure at or below 0 is taken over 1, as it is). For one criterion its figure; ties keep the cost order.