9 releases

Uses old Rust 2015

0.1.5 Oct 5, 2016
0.1.4 Feb 3, 2016
0.1.3 Jun 24, 2015
0.1.2 Apr 20, 2015
0.0.4 Jan 13, 2015

#465 in Science

Download history 156/week @ 2024-05-22 137/week @ 2024-05-29 1119/week @ 2024-06-05 1848/week @ 2024-06-12 2381/week @ 2024-06-19 3270/week @ 2024-06-26 2652/week @ 2024-07-03 2033/week @ 2024-07-10 612/week @ 2024-07-17 146/week @ 2024-07-24 285/week @ 2024-07-31 277/week @ 2024-08-07 685/week @ 2024-08-14 397/week @ 2024-08-21 466/week @ 2024-08-28 374/week @ 2024-09-04

2,007 downloads per month
Used in 6 crates (2 directly)

MIT/Apache

13KB
233 lines

Frequency Distribution

Build Status

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

use freqdist::FrequencyDistribution;

let mut fdist = FrequencyDistribution::new();

fdist.insert("hello");
fdist.insert("hello");
fdist.insert("goodbye");

assert_eq!(fdist.get(&"hello"), 2);

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps