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

#511 in Science

Download history 141/week @ 2024-07-23 210/week @ 2024-07-30 291/week @ 2024-08-06 692/week @ 2024-08-13 408/week @ 2024-08-20 466/week @ 2024-08-27 461/week @ 2024-09-03 433/week @ 2024-09-10 402/week @ 2024-09-17 131/week @ 2024-09-24 152/week @ 2024-10-01 166/week @ 2024-10-08 165/week @ 2024-10-15 107/week @ 2024-10-22 696/week @ 2024-10-29 369/week @ 2024-11-05

1,366 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