circlejerk
A tiny in-memory opinion tracker for measuring group consensus.
circlejerk counts repeated opinions and reports whether a group agrees, how
strong the dominant opinion is, and which opinion has the most support.
Usage
Add the crate to your project:
[]
= "0.1.1"
Record opinions and inspect the result:
use CircleJerk;
let mut group = new;
group.agree;
group.agree;
group.agree;
assert_eq!;
assert_eq!;
assert_eq!;
assert!;
Each call to agree counts as one participant. The crate does not track
participant identities. If several opinions tie for the most support,
dominant_opinion may return any one of them.
License
Licensed under the MIT License. See LICENSE for details.