@Override public Bitmap flip(int rangeStart, int rangeEnd) { // synthesized with 2-upper-bounded NOTs // unfortunately, cannot be used with an immutable bitmap. // for that case, could synthesize from XOR and a mask for the range int savedSize = bitmap.sizeInBits(); EWAHCompressedBitmap temp = null; try { temp = (EWAHCompressedBitmap) bitmap.clone(); } catch (CloneNotSupportedException e) { } ; temp.setSizeInBits(rangeEnd, false); temp.not(); if (rangeStart != 0) { temp.setSizeInBits(rangeStart - 1, false); temp.not(); } temp.setSizeInBits(savedSize, false); return new EwahBitmapWrapper(temp); }
private InflatingBitSet(EWAHCompressedBitmap orBitmap, long[] inflated) { this.bitmap = orBitmap; this.inflated = inflated; this.sizeInBits = bitmap.sizeInBits(); }
final InflatingBitSet or(EWAHCompressedBitmap other) { if (other.sizeInBits() == 0) return this; return new InflatingBitSet(bitmap.or(other), inflated); }
final InflatingBitSet xor(EWAHCompressedBitmap other) { if (isEmpty()) { if (other.sizeInBits() == 0) return this; return new InflatingBitSet(other); } return new InflatingBitSet(bitmap.xor(other)); }
@Override public int compare(EWAHCompressedBitmap a, EWAHCompressedBitmap b) { return b.sizeInBits() - a.sizeInBits(); } });
@Override public int compare(EWAHCompressedBitmap a, EWAHCompressedBitmap b) { return b.sizeInBits() - a.sizeInBits(); } });
private InflatingBitSet(EWAHCompressedBitmap orBitmap, long[] inflated) { this.bitmap = orBitmap; this.inflated = inflated; this.sizeInBits = bitmap.sizeInBits(); }
@Override public int compare(EWAHCompressedBitmap a, EWAHCompressedBitmap b) { return b.sizeInBits() - a.sizeInBits(); } });
@Override public int compare(EWAHCompressedBitmap a, EWAHCompressedBitmap b) { return b.sizeInBits() - a.sizeInBits(); } });
private InflatingBitSet(EWAHCompressedBitmap orBitmap, long[] inflated) { this.bitmap = orBitmap; this.inflated = inflated; this.sizeInBits = bitmap.sizeInBits(); }
static int maxSizeInBits(final EWAHCompressedBitmap... bitmaps) { int maxSizeInBits = 0; for(EWAHCompressedBitmap bitmap : bitmaps) { maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits()); } return maxSizeInBits; }
static int maxSizeInBits(final EWAHCompressedBitmap... bitmaps) { int maxSizeInBits = 0; for(EWAHCompressedBitmap bitmap : bitmaps) { maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits()); } return maxSizeInBits; }
final InflatingBitSet or(EWAHCompressedBitmap other) { if (other.sizeInBits() == 0) return this; return new InflatingBitSet(bitmap.or(other), inflated); }
final InflatingBitSet or(EWAHCompressedBitmap other) { if (other.sizeInBits() == 0) return this; return new InflatingBitSet(bitmap.or(other), inflated); }
if (bitmap.sizeInBits() > range) range = bitmap.sizeInBits(); al.add(new IteratingBufferedRunningLengthWord(bitmap));
if (bitmap.sizeInBits() > range) range = bitmap.sizeInBits(); al.add(new IteratingBufferedRunningLengthWord(bitmap));
if (bitmap.sizeInBits() > range) range = bitmap.sizeInBits(); al.add(new IteratingBufferedRunningLengthWord(bitmap));
final InflatingBitSet xor(EWAHCompressedBitmap other) { if (isEmpty()) { if (other.sizeInBits() == 0) return this; return new InflatingBitSet(other); } return new InflatingBitSet(bitmap.xor(other)); }
final InflatingBitSet xor(EWAHCompressedBitmap other) { if (isEmpty()) { if (other.sizeInBits() == 0) return this; return new InflatingBitSet(other); } return new InflatingBitSet(bitmap.xor(other)); }
final IteratingBufferedRunningLengthWord remaining = i_remains ? rlwi : rlwj; remaining.discharge(container); container.setSizeInBitsWithinLastWord(Math.max(sizeInBits(), a.sizeInBits()));