Skip to content
Prev 41450 / 63424 Next

BitSet equivalent? Java code usable?

If you don't have NAs in your bits, you might be able to use the raw
vector type. A raw value is one byte (8 bits), doesn't support NAs and
supports bit operations on all the bits at once:

  &, |, !, xor

You'd probably want to wrap it into a class that allows a more
BitSet-like view of it though. Maybe there's a package out there that
does that already?

...and if you DO have NAs, you could use two raw vectors (or two
consecutive raw-vector bits per BitSet bit).

Good luck!

/Tommy

2011/10/8 Uwe Ligges <ligges at statistik.tu-dortmund.de>: