ComboBitset: Add Javadoc
Change-Id: I799991327cadf646329eacbac40d41cb1b3391ad
This commit is contained in:
parent
c46b54eeac
commit
ac70632f51
|
@ -86,6 +86,11 @@ int findOrInsert(AnyObjectId objectId, int type) {
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A bitset for representing small changes (set/remove individual bits)
|
||||||
|
* relative to an existing EWAH bitmap. Executing bit-vector operations will
|
||||||
|
* materialize the changes into a fresh EWAH bitmap
|
||||||
|
*/
|
||||||
private static final class ComboBitset {
|
private static final class ComboBitset {
|
||||||
private InflatingBitSet inflatingBitmap;
|
private InflatingBitSet inflatingBitmap;
|
||||||
|
|
||||||
|
@ -121,18 +126,21 @@ EWAHCompressedBitmap combine() {
|
||||||
return inflatingBitmap.getBitmap();
|
return inflatingBitmap.getBitmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* In-place or operation */
|
||||||
void or(EWAHCompressedBitmap inbits) {
|
void or(EWAHCompressedBitmap inbits) {
|
||||||
if (toRemove != null)
|
if (toRemove != null)
|
||||||
combine();
|
combine();
|
||||||
inflatingBitmap = inflatingBitmap.or(inbits);
|
inflatingBitmap = inflatingBitmap.or(inbits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* In-place andNot operation */
|
||||||
void andNot(EWAHCompressedBitmap inbits) {
|
void andNot(EWAHCompressedBitmap inbits) {
|
||||||
if (toAdd != null || toRemove != null)
|
if (toAdd != null || toRemove != null)
|
||||||
combine();
|
combine();
|
||||||
inflatingBitmap = inflatingBitmap.andNot(inbits);
|
inflatingBitmap = inflatingBitmap.andNot(inbits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* In-place xor operation. */
|
||||||
void xor(EWAHCompressedBitmap inbits) {
|
void xor(EWAHCompressedBitmap inbits) {
|
||||||
if (toAdd != null || toRemove != null)
|
if (toAdd != null || toRemove != null)
|
||||||
combine();
|
combine();
|
||||||
|
|
Loading…
Reference in New Issue