Skip to main content

weighted_multi

Function weighted_multi 

Source
pub fn weighted_multi<I, L>(
    lists: &[(L, f32)],
    normalize: bool,
    top_k: Option<usize>,
) -> Result<Vec<(I, f32)>>
where I: Clone + Eq + Hash, L: AsRef<[(I, f32)]>,
Expand description

Weighted fusion for 3+ result lists.

Each list is paired with its weight. Weights are normalized to sum to 1.

ยงErrors

Returns Err(FusionError::ZeroWeights) if weights sum to zero.