The OrderedBits package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.



This library provides efficient methods to enumerate all elements of a set in order of the population count, or the ordered enumerations of the elements of the powerset of a set. First, the empty set, then all 1-element sets, all 2-element sets, etc. Such enumerations are important for algorithms over unordered data sets. Examples include the travelling salesman problem and the closely related Hamiltonian path problem.

[Skip to ReadMe]


Dependenciesbase (>=4.7 && <5.0), bits (>=0.4 && <0.6), primitive (>=0.5 && <0.7), vector (>=0.10 && <0.12), vector-algorithms (>=0.6 && <0.7.1) [details]
CopyrightChristian Hoener zu Siederdissen, 2014 - 2016
AuthorChristian Hoener zu Siederdissen
Home page
Bug tracker
Source repositoryhead: git clone git://
UploadedThu Sep 1 12:47:18 UTC 2016 by ChristianHoener




Maintainers' corner

For package maintainers and hackage trustees

Readme for OrderedBits-

[back to package description]

Build Status


The OrderedBits library provides methods to generate unboxed vectors of Ints (and others) ordered by their population count or Hamming distance to the 0 set. In other words, we enumerate the power set of a given input set.

Such an order is important for dynamic programming algorithms for Hamiltonian path problems and the travelling salesman problem.


Christian Hoener zu Siederdissen
Leipzig University, Leipzig, Germany