On 10 jun 2009, at 11:15, Olivier Hamel wrote:
Hans van der Meer 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>
My first thought when I read 'bitmaps' was Win32 bitmaps, after which I read this and it seems to be some sort of massive array of bits which can be manipulated?
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.
Oh wait, this is a wrapping of a number handled as an object /w metamethods, correct?
Indeed, metamethods may be used for combining bitmaps with AND, OR, XOR.