Boost logo

Boost Users :

Subject: [Boost-users] [dynamic_bitset] arbitrarily wide bitset
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2015-12-11 10:11:17


Hello,

I am working on a statistical system that relies on composite bit wise
masks to indicate various statistics throughout its engine.

Bit wise "vocabulary" is known at compile time and may be of arbitrary
length, although consistent across vocabulary categories.

I am curious how wide dynamic_bitset may be? Potentially,
std::bitset<N> is sufficiently up to the task?

Should also be serializable; i.e. composite masks may be formed.
Should also be capable of serving as a map key; i.e. a lookup of
statistical values.

Reading a couple of blogs, on SO, for instance, it seems like this
should be doable.

Reference:
http://en.cppreference.com/w/cpp/utility/bitset
http://www.cplusplus.com/reference/bitset/bitset/
http://www.boost.org/doc/libs/1_59_0/libs/dynamic_bitset/dynamic_bitset.html
http://stackoverflow.com/questions/14433626/variable-size-bitset
http://stackoverflow.com/questions/3896357/unordered-hash-map-from-bitset-to-bitset-on-boost

Example:
https://ideone.com/fork/WnmfyW

Thank you.

Regards,

Michael


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net