Search in sources :

Example 1 with ZipRealDataRetriever

use of org.roaringbitmap.ZipRealDataRetriever in project RoaringBitmap by RoaringBitmap.

the class ParallelAggregatorBenchmark method setup.

@Setup(Level.Trial)
public void setup() throws Exception {
    bitmaps = DATASET_CACHE.get(dataset, () -> {
        System.out.println("Loading" + dataset);
        ZipRealDataRetriever dataRetriever = new ZipRealDataRetriever(dataset);
        return StreamSupport.stream(dataRetriever.fetchBitPositions().spliterator(), false).map(RoaringBitmap::bitmapOf).toArray(RoaringBitmap[]::new);
    });
    immutableRoaringBitmaps = Arrays.stream(bitmaps).map(RoaringBitmap::toMutableRoaringBitmap).toArray(ImmutableRoaringBitmap[]::new);
}
Also used : ZipRealDataRetriever(org.roaringbitmap.ZipRealDataRetriever) ImmutableRoaringBitmap(org.roaringbitmap.buffer.ImmutableRoaringBitmap) RoaringBitmap(org.roaringbitmap.RoaringBitmap) ImmutableRoaringBitmap(org.roaringbitmap.buffer.ImmutableRoaringBitmap) MutableRoaringBitmap(org.roaringbitmap.buffer.MutableRoaringBitmap)

Aggregations

RoaringBitmap (org.roaringbitmap.RoaringBitmap)1 ZipRealDataRetriever (org.roaringbitmap.ZipRealDataRetriever)1 ImmutableRoaringBitmap (org.roaringbitmap.buffer.ImmutableRoaringBitmap)1 MutableRoaringBitmap (org.roaringbitmap.buffer.MutableRoaringBitmap)1