The majority package

[Tags:library, public-domain]

The Boyer-Moore Majority Vote Algorithm determines if there in a list of votes is a candidate that holds more than half of the majority, and if so, finds this candidate. It does so in time linear in the length of the input list and constant memory. For a detailed description of the algorithm, see these papers:


[Skip to Readme]

Properties

Versions 1.0, 1.1
Dependencies haskell2010 [details]
License PublicDomain
Author Nis N. Wegmann
Maintainer niswegmann@gmail.com
Stability provisional
Category Algorithms
Home page https://github.com/niswegmann/majority
Source repository head: git clone https://github.com/niswegmann/majority.git
Uploaded Mon Jul 18 15:57:23 UTC 2011 by NisWegmann
Distributions NixOS:1.1
Downloads 519 total (3 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for majority

Readme for majority-1.1

Majority

The Boyer-Moore Majority Vote Algorithm determines if there in a list of votes is a candidate that holds more than half of the majority, and if so, finds this candidate. It does so in time linear in the length of the input list and constant memory. For a detailed description of the algorithm, see these papers:

  • Wim H. Hesselink, "/The Boyer-Moore Majority Vote Algorithm/", 2005;

  • Robert S. Boyer and J. Strother Moore, "/MJRTY - A Fast Majority Vote Algorithm/",

Install

Assuming you have installed the Haskell Platform use cabal:

$ cabal install majority

Bugs

Comments, bug reports, and patches will be much appreciated:

License

This library is distributed under a CC0 1.0 Universal Public Domain Dedication: