Skip to content

Commit

Permalink
chore: update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed Apr 22, 2024
1 parent 97b3f4a commit 69454d8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions candidate-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@ pub trait Candidate {
fn score_many<const LIMIT: usize>(candidates: &[&Self]) -> Normalized;
}

/// Perform a random selection of up to `LIMIT` of the provided candidates. Candidates are picked
/// using a random selection weighted by their individual score. Additional candidates are only
/// added as their inclusion in the selected set increases the combined score of the selected set.
/// Select up to `LIMIT` of the provided candidates.
///
/// At least one candidate will be selected, as long as there is at least one candidate with an
/// individual score greater than 0.
///
/// If a candidate's score is below `min_score_cutoff` as a proportion of the max provider's
/// individual score, then the provider will not be selected.
pub fn select<'c, Candidate, const LIMIT: usize>(
candidates: &'c [Candidate],
) -> ArrayVec<&'c Candidate, LIMIT>
Expand Down

0 comments on commit 69454d8

Please sign in to comment.