All Questions
15 questions
2
votes
0
answers
66
views
A machine learning model for predicting bit strings in Java
I have this GitHub repository (BitPredictor.java). Basically, I tried to harness a machine learning model for predicting bit strings. I have implemented it to the best of my understanding and have ...
1
vote
1
answer
117
views
Bit vector in Java supporting O(1) rank() and O(log n) select() - follow-up
(This post is the continuation of Bit vector in Java supporting O(1) rank() and O(log n) select(). It resides here (version 1.0.1).)
Basically, I have implemented everything harold suggested, except ...
1
vote
1
answer
178
views
Bit vector in Java supporting O(1) rank() and O(log n) select()
Introduction
I have this GitHub repository (version 1.0.0.). It implements a rank(i) operation in \$\Theta(1)\$ time, and ...
1
vote
4
answers
226
views
Permuting BitSet in Java
I have this tool for permuting bits in BitSets:
com.stackexchange.codereview.util.BitPermutation.java:
...
0
votes
1
answer
168
views
Transformations on a game board represented as a bitset
I'm using a long as a bitset to represent a game board. If a field is set (X) the corresponding bit is set, if it's empty (...
8
votes
2
answers
1k
views
Representing Tic-Tac-Toe using a binary BitBoard
So I have been learning more about binary numbers lately, particularly
in related to describing a gamestate. While perhaps chess is the most natural candidate I wanted to start of with something ...
3
votes
4
answers
125
views
Move an unaligned bit-addressed range into another bitmap
Context
I have an array of maximum-fixed-size, size, containers of items; these items are either pointers to objects or an index of the same array, (but no loops.) ...
4
votes
0
answers
657
views
BitVector64 implementation
I have implemented a structure to handle BitVector64 (default System library support only 32 bits).
In the implementation i have added some custom method to manipulate bits inside the vector.
I would ...
7
votes
3
answers
1k
views
Bit shift 256 bits
I have a working solution to my problem, but I'm less than satisfied with the result, both when it comes to style and performance.
In short, I need to be able to shift 256 bits of data, say an array ...
2
votes
3
answers
408
views
Adding two n and m bit binary numbers
Recently I was studying bitwise operators and bit-manipulation algorithms and I found out an algorithm to add two binary numbers.
Pseudocode is as follows:
...
7
votes
1
answer
5k
views
Creating and storing binary arrays
I recently created a library in C, which creates and stores binary arrays. My library uses the standard fixed data types and allocates no more than 8 bytes for a binary array (8 bytes = 64-bit ...
7
votes
1
answer
256
views
Representing integers as a sequence of bits
Here is a class Bits that I wrote in order to deal with sequences of bits that also need to be interpreted as non-negative integers (in case you are familiar with ...
2
votes
1
answer
107
views
Adding bits, simpler
Considering that two bitsets are provided in the form of strings, char a[] and char b[], as in the code below. And the task of ...
10
votes
1
answer
7k
views
Bit shifting and masking
I was wondering if someone could review this simple bit of code that originally was in C++, but now converted to C# as practice in using bit-shifting and creating a sort of a quasi-array functionality....
6
votes
1
answer
714
views
Bit string builder for Java
I have this Java class for building bit strings. The set of methods it provides resembles that of java.lang.StringBuilder.
See what I have:
BitStringBuilder.java:
...