Function smartnoise_runtime::utilities::sample_from_set[][src]

pub fn sample_from_set<T>(
    candidate_set: &[T],
    weights: &[Float],
    _enforce_constant_time: bool
) -> Result<T> where
    T: Clone

Samples a single element from a set according to provided weights.

Arguments

Return

Element from the candidate set