예제 #1
0
 @Override
 public Container add(int begin, int end) {
   BitmapContainer answer = clone();
   Util.setBitmapRange(answer.bitmap, begin, end);
   answer.computeCardinality();
   return answer;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
0
 @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;
 }
예제 #5
0
 @Override
 public Container iadd(int begin, int end) {
   Util.setBitmapRange(bitmap, begin, end);
   computeCardinality();
   return this;
 }