Expand description
Implementation of a Frequency Distribution in Rust. Keeps track of how many times an object appears in a larger context (for example, how many times a word appears in a piece of text). The underlying data structure of the Frequency Distribution is a HashMap, so the object that is being counted must be hashable.
§Example
let mut fdist: FrequencyDistribution<&str> = FrequencyDistribution::new();
fdist.insert("hello");
fdist.insert("hello");
fdist.insert("goodbye");
assert_eq!(fdist.get(&"hello"), 2);
Structs§
- Iterator over entries with non-zero quantities.