Skip to main content

random_argmax

Function random_argmax 

Source
pub fn random_argmax<I>(values: I, random: &dyn Random) -> Option<usize>
where I: Iterator<Item = f64>,
Expand description

Returns an index of max element in values. In case of many same max elements, returns the one from them at random.