Struct elements_frequency::interface::Elements [−][src]
pub struct Elements<'list, T> { /* fields omitted */ }Implementations
Hash the elements to their frequency.
When we iterate over the hash, the elements might come unordered. So we update their order in this method in a third list namingly frequency table.
Finally we need to chain hash_couple and update_order with
result method to get final result.
Examples
use elements_frequency::interface::{Row, Elements}; let list = vec![-5, 11, 4, 4, -5, -7, 11]; let mut elements = Elements::new(&list); let frequency_table = elements.hash_couple().update_order().result();