Java Code Examples for it.uniroma3.mat.extendedset.intset.ConciseSet#union()

The following examples show how to use it.uniroma3.mat.extendedset.intset.ConciseSet#union() . 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: AllRunHorizontalOrBenchmark.java    From RoaringBitmap with Apache License 2.0 5 votes vote down vote up
@Benchmark
public int OrConcise(BenchmarkState benchmarkState) {
  ConciseSet base = benchmarkState.cc.get(0);
  for (int k = 1; k < benchmarkState.cc.size(); ++k)
    base.union(benchmarkState.cc.get(k));
  return base.size();
}
 
Example 2
Source File: AllRunHorizontalOrBenchmark.java    From RoaringBitmap with Apache License 2.0 5 votes vote down vote up
@Benchmark
public int OrWAH(BenchmarkState benchmarkState) {
  ConciseSet base = benchmarkState.wah.get(0);
  for (int k = 1; k < benchmarkState.wah.size(); ++k)
    base.union(benchmarkState.wah.get(k));
  return base.size();
}
 
Example 3
Source File: ConciseSetWrapper.java    From RoaringBitmap with Apache License 2.0 5 votes vote down vote up
@Override
public BitmapAggregator naiveOrAggregator() {
  return new BitmapAggregator() {
    @Override
    public Bitmap aggregate(Iterable<Bitmap> bitmaps) {
      final Iterator<Bitmap> i = bitmaps.iterator();
      ConciseSet bitmap = ((ConciseSetWrapper) i.next()).bitmap;
      while (i.hasNext()) {
        bitmap = bitmap.union(((ConciseSetWrapper) i.next()).bitmap);
      }
      return new ConciseSetWrapper(bitmap);
    }
  };
}