@Override public Container add(int begin, int end) { BitmapContainer answer = clone(); Util.setBitmapRange(answer.bitmap, begin, end); answer.computeCardinality(); return answer; }
protected Container ilazyor(RunContainer x) { // could be implemented as return ilazyor(x.toTemporaryBitmap()); cardinality = -1; // invalid for (int rlepos = 0; rlepos < x.nbrruns; ++rlepos) { int start = Util.toIntUnsigned(x.getValue(rlepos)); int end = start + Util.toIntUnsigned(x.getLength(rlepos)) + 1; Util.setBitmapRange(this.bitmap, start, end); } return this; }
protected Container lazyor(RunContainer x) { BitmapContainer bc = clone(); bc.cardinality = -1; // invalid for (int rlepos = 0; rlepos < x.nbrruns; ++rlepos) { int start = Util.toIntUnsigned(x.getValue(rlepos)); int end = start + Util.toIntUnsigned(x.getLength(rlepos)) + 1; Util.setBitmapRange(bc.bitmap, start, end); } return bc; }
@Override public Container ior(RunContainer x) { // could probably be replaced with return ior(x.toBitmapOrArrayContainer()); for (int rlepos = 0; rlepos < x.nbrruns; ++rlepos) { int start = Util.toIntUnsigned(x.getValue(rlepos)); int end = start + Util.toIntUnsigned(x.getLength(rlepos)) + 1; Util.setBitmapRange(this.bitmap, start, end); } computeCardinality(); return this; }
@Override public Container iadd(int begin, int end) { Util.setBitmapRange(bitmap, begin, end); computeCardinality(); return this; }