@Override public Bitmap aggregate(final Iterable<Bitmap> bitmaps) { Iterator<EWAHCompressedBitmap32> iterator = new Iterator<EWAHCompressedBitmap32>() { final Iterator<Bitmap> i = bitmaps.iterator(); @Override public boolean hasNext() { return i.hasNext(); } @Override public EWAHCompressedBitmap32 next() { return ((Ewah32BitmapWrapper) i.next()).bitmap; } @Override public void remove() { throw new UnsupportedOperationException(); } }; return new Ewah32BitmapWrapper(FastAggregation32.or(iterator)); } };
/** * Returns a new compressed bitmap containing the bitwise OR values of * the provided bitmaps. This is typically faster than doing the * aggregation two-by-two (A.or(B).or(C).or(D)). * * If only one bitmap is provided, it is returned as is. * * If you are not planning on adding to the resulting bitmap, you may * call the trim() method to reduce memory usage. * * @param bitmaps bitmaps to OR together * @return result of the OR */ public static EWAHCompressedBitmap32 or( final EWAHCompressedBitmap32... bitmaps) { return FastAggregation32.or(bitmaps); }
/** * Returns a new compressed bitmap containing the bitwise OR values of * the provided bitmaps. This is typically faster than doing the * aggregation two-by-two (A.or(B).or(C).or(D)). * * If only one bitmap is provided, it is returned as is. * * If you are not planning on adding to the resulting bitmap, you may * call the trim() method to reduce memory usage. * * @param bitmaps bitmaps to OR together * @return result of the OR */ public static EWAHCompressedBitmap32 or( final EWAHCompressedBitmap32... bitmaps) { return FastAggregation32.or(bitmaps); }