On 10 jun 2009, at 11:15, Olivier Hamel wrote:
As I did a bitmap implementation, I hereby add its html-docs of this for what it is worth in the discussion. Interested parties can find the code here (use it with due credit): http://staff.science.uva.nl/~hansm/publications.html <http://staff.science.uva.nl/%7Ehansm/publications.html>
Yes, it is an array of bits, packed as tight as can be. Bits in the array can be set, queried and iterated on. The testfile in the package does a prime number sieve of Eratosthenes as an example, showing that very many boolean flags can be manipulated comfortably.
Indeed, metamethods may be used for combining bitmaps with AND, OR, XOR.
The module cannot do arithmetic operations(like i<<1 or i>>1 for doing powers of two). It was not designed as such and I agree with the quote of Roberto in that one should not lightly tamper with arithmetics.
Hans van der Meer