Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

WeightedProduct always returns zero #103

@ItsDoot

Description

@ItsDoot

This should have an initial value of one, not zero:

impl Measure for WeightedProduct {
fn calculate(&self, scores: Vec<(&Score, f32)>) -> f32 {
scores
.iter()
.fold(0f32, |acc, (score, weight)| acc * score.0 * weight)
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions