public static Bitmap newEwahBitmap(int[] data) { EWAHCompressedBitmap ewah = EWAHCompressedBitmap.bitmapOf(data); return new EwahBitmapWrapper(ewah); }
public BenchmarkState() { int N = 30; Random rand = new Random(1234); for (int k = 0; k < N; ++k) { RoaringBitmap rb = new RoaringBitmap(); int start = rand.nextInt(10000); for (int z = 0; z < 50; ++z) { int end = start + rand.nextInt(10000); rb.add(start, end); start = end + rand.nextInt(1000); } ConciseSet ccs = toConcise(rb.toArray()); cc.add(ccs); wah.add(toWAH(rb.toArray())); icc.add(ImmutableConciseSet.newImmutableFromMutable(ccs)); ac.add(rb); rb = rb.clone(); rb.runOptimize(); rc.add(rb); ewah.add(EWAHCompressedBitmap.bitmapOf(rb.toArray())); ewah32.add(EWAHCompressedBitmap32.bitmapOf(rb.toArray())); } } }
/** * Creates a new <code>SparseBitmap</code> that is empty. * * @return A new <code>SparseBitmap</code> that is empty (no bits set). */ public static SparseBitmap createEmpty() { return new SparseBitmap(EWAHCompressedBitmap.bitmapOf()); }
/** * Creates a new <code>SparseBitmap</code> from data that are already sorted * in strictly ascending order (duplicate values are okay). * * @param bitsToSet The bits to set. * @return A new <code>SparseBitmap</code> with the given bits set. */ public static SparseBitmap createFromSortedData(final int... bitsToSet) { return new SparseBitmap(EWAHCompressedBitmap.bitmapOf(bitsToSet)); }
/** * Creates a new <code>SparseBitmap</code> from unsorted data. * * @param bitsToSet The bits to set. * @return A new <code>SparseBitmap</code> with the given bits set. */ public static SparseBitmap createFromUnsortedData(final int... bitsToSet) { Arrays.sort(bitsToSet); return new SparseBitmap(EWAHCompressedBitmap.bitmapOf(bitsToSet)); }
/** * Creates a new <code>SparseBitmap</code> from unsorted data. * * @param bitsToSet The bits to set. * @return A new <code>SparseBitmap</code> with the given bits set. */ public static SparseBitmap createFromUnsortedData(final int... bitsToSet) { Arrays.sort(bitsToSet); return new SparseBitmap(EWAHCompressedBitmap.bitmapOf(bitsToSet)); }
/** * Creates a new <code>SparseBitmap</code> that is empty. * * @return A new <code>SparseBitmap</code> that is empty (no bits set). */ public static SparseBitmap createEmpty() { return new SparseBitmap(EWAHCompressedBitmap.bitmapOf()); }
/** * Creates a new <code>SparseBitmap</code> from data that are already sorted * in strictly ascending order (duplicate values are okay). * * @param bitsToSet The bits to set. * @return A new <code>SparseBitmap</code> with the given bits set. */ public static SparseBitmap createFromSortedData(final int... bitsToSet) { return new SparseBitmap(EWAHCompressedBitmap.bitmapOf(bitsToSet)); }