Function vrp_core::utils::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.