Top "Bitset" questions

A collection of bits organized as an array of bits, in which each bit can be accessed separately.

How do I create a bitset from binary string?

I have a binary string in a file that looks like 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100100101101100110000110100110110111000010100110110110110111000011001000010110010010001100010010001010010010100001011001100010100001100100011011101 (which is 256 bits). Can I set this string as …

c++ char bitset
Alternative to Java Bitset with array like performance?

I am looking for an alternative to Java Bitset implementation. I am implementing a high performance algorithm and seems like …

java arrays bitset
Fastest way to compare bitsets (< operator on bitsets)?

What is the most optimized way to implement a < operator for std::bitset corresponding to the comparison of the …

c++ algorithm c++11 bit-manipulation bitset
Shifting a Java BitSet

I am using a java.util.BitSet to store a dense vector of bits. I want to implement an operation …

java bitset bit-shift
Is the use of std::vector<bool> objects in C++ acceptable, or should I use an alternative?

I'm working with a user-defined quantity of bits (I'm holding a three-dimensional array of bits, so the size increases cubically …

c++ stl vector boolean bitset
Efficient way of iterating over true bits in std::bitset?

Is there a way of iterating over a (possibly huge) std::bitset that is linear in the number of bits …

c++ algorithm data-structures iteration bitset
How to implement dynamic bitset in my specific code

I am using bitset and to improve the performance of my code I want to change it to dynamic bitset, …

c++ bitset
Get all Indexes of the set bits in a BitSet

I'm looking for a fast algorithm with gives me all the indexes of the set bits in a BitSet object. …

java bitset
Define a large bitset in C++

In my program I need to check if I have already generated a value in a set of 2.5*10^9. I expect …

c++ bitset
Concatenate boost::dynamic_bitset or std::bitset

what is the best way to concatenate 2 bitsets? For example i've got boost::dynamic_bitset<> test1( std::string("1111") ); …

c++ boost std bitset