#frequency #count #statistics #stats

frequency-hashmap

A counter for observations of things, backed by a HashMap

1 stable release

Uses old Rust 2015

1.1.0 Mar 25, 2017
1.0.0 Mar 25, 2017

#53 in #stats


Used in redis-analyzer

MIT license

10KB
159 lines

The Frequency trait represents types that keep track of the observed counts of items. The HashMapFrequency type is a frequency counter backed by a HashMap.

Usage

Add frequency and frequency-hashmap to your Cargo.toml:

[dependencies]
frequency = "^1.0.0"
frequency-hashmap = "^1.0.0"

Import both Frequency and HashMapFrequency:

extern crate frequency;
extern crate frequency_hashmap;

use frequency::Frequency;
use frequency_hashmap::HashMapFrequency;

lib.rs:

The Frequency trait represents types that keep track of the observed counts of items. The HashMapFrequency type is a frequency counter backed by a HashMap.

Usage

Add frequency and frequency-hashmap to your Cargo.toml:

[dependencies]
frequency = "^1.0.0"
frequency-hashmap = "^1.0.0"

Import both Frequency and HashMapFrequency:

extern crate frequency;
extern crate frequency_hashmap;

use frequency::Frequency;
use frequency_hashmap::HashMapFrequency;

Dependencies

~260KB