Java Code Examples for org.roaringbitmap.RoaringBitmap#and()
The following examples show how to use
org.roaringbitmap.RoaringBitmap#and() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RoaringBitmapBenchmark.java From RoaringBitmap with Apache License 2.0 | 5 votes |
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public RoaringBitmap inplace_and() { RoaringBitmap b1 = bitmap1.clone(); b1.and(bitmap2); return b1; }
Example 2
Source File: RoaringBitmapBenchmark.java From RoaringBitmap with Apache License 2.0 | 5 votes |
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public RoaringBitmap inplace_and() { RoaringBitmap b1 = bitmap1.clone(); b1.and(bitmap2); return b1; }
Example 3
Source File: RoaringBitmapBenchmark.java From RoaringBitmap with Apache License 2.0 | 5 votes |
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public RoaringBitmap inplace_and() { RoaringBitmap b1 = bitmap1.clone(); b1.and(bitmap2); return b1; }
Example 4
Source File: RealDataBenchmarkOrNot.java From RoaringBitmap with Apache License 2.0 | 5 votes |
@Benchmark public void pairwiseOrNotExternal(RealDataRoaringBitmaps state, Blackhole bh) { RoaringBitmap[] bitmaps = state.getBitmaps(); for (int k = 0; k + 1 < bitmaps.length; ++k) { long limit = toUnsignedLong(bitmaps[k].last()); RoaringBitmap range = new RoaringBitmap(); range.add(0, limit); RoaringBitmap bitmap = RoaringBitmap.and(range, bitmaps[k+1]); bitmap.flip(0L, limit); bitmap.or(RoaringBitmap.and(range, bitmaps[k])); bh.consume(bitmap); } }
Example 5
Source File: RoaringBitmapBenchmark.java From RoaringBitmap with Apache License 2.0 | 4 votes |
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public RoaringBitmap and() { return RoaringBitmap.and(bitmap1, bitmap2); }
Example 6
Source File: RoaringBitmapBenchmark.java From RoaringBitmap with Apache License 2.0 | 4 votes |
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public RoaringBitmap and() { return RoaringBitmap.and(bitmap1, bitmap2); }
Example 7
Source File: RoaringBitmapBenchmark.java From RoaringBitmap with Apache License 2.0 | 4 votes |
@Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) public RoaringBitmap and() { return RoaringBitmap.and(bitmap1, bitmap2); }
Example 8
Source File: RoaringBitmapWrapper.java From RoaringBitmap with Apache License 2.0 | 4 votes |
@Override public Bitmap and(Bitmap other) { return new RoaringBitmapWrapper( RoaringBitmap.and(bitmap, ((RoaringBitmapWrapper) other).bitmap)); }