Function engram::statistics::mode

source ·
pub fn mode<T: Copy + Eq + Hash>(data: &[T]) -> Option<T>
Expand description

Returns the mode of a list of values.

§Examples

let values = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 9];
let mode = mode(&values);