public static EWAHCompressedBitmap32 or(final Iterator<EWAHCompressedBitmap32> bitmaps) {
        PriorityQueue<EWAHCompressedBitmap32> pq = new PriorityQueue<EWAHCompressedBitmap32>(32,
                new Comparator<EWAHCompressedBitmap32>() {
                    @Override
                    public int compare(EWAHCompressedBitmap32 a, EWAHCompressedBitmap32 b) {
                        return a.sizeInBytes()
                                - b.sizeInBytes();
                    }
                }
        );
        while(bitmaps.hasNext())
            pq.add(bitmaps.next());
        if(pq.isEmpty()) return new EWAHCompressedBitmap32();
        while (pq.size() > 1) {
            EWAHCompressedBitmap32 x1 = pq.poll();
            EWAHCompressedBitmap32 x2 = pq.poll();
            pq.add(x1.or(x2));
        }
        return pq.poll();
    }
public static EWAHCompressedBitmap32 or(final Iterator<EWAHCompressedBitmap32> bitmaps) {
        PriorityQueue<EWAHCompressedBitmap32> pq = new PriorityQueue<EWAHCompressedBitmap32>(32,
                new Comparator<EWAHCompressedBitmap32>() {
                    @Override
                    public int compare(EWAHCompressedBitmap32 a, EWAHCompressedBitmap32 b) {
                        return a.sizeInBytes()
                                - b.sizeInBytes();
                    }
                }
        );
        while(bitmaps.hasNext())
            pq.add(bitmaps.next());
        if(pq.isEmpty()) return new EWAHCompressedBitmap32();
        while (pq.size() > 1) {
            EWAHCompressedBitmap32 x1 = pq.poll();
            EWAHCompressedBitmap32 x2 = pq.poll();
            pq.add(x1.or(x2));
        }
        return pq.poll();
    }
public static EWAHCompressedBitmap32 or ( final Iterator < EWAHCompressedBitmap32 > bitmaps ) { PriorityQueue < EWAHCompressedBitmap32 > pq = new PriorityQueue < EWAHCompressedBitmap32 > ( 32 , new Comparator < EWAHCompressedBitmap32 > ( ) { @ Override public int compare ( EWAHCompressedBitmap32 a , EWAHCompressedBitmap32 b ) { return a . sizeInBytes ( ) - b . sizeInBytes ( ) ; } } ) ; while ( bitmaps . hasNext ( ) ) pq . add ( bitmaps . next ( ) ) ; if ( pq . isEmpty ( ) ) return new EWAHCompressedBitmap32 ( ) ; while ( pq . size ( ) > 1 ) { EWAHCompressedBitmap32 x1 = pq . poll ( ) ; EWAHCompressedBitmap32 x2 = pq . poll ( ) ; pq . add ( x1 . or ( x2 ) ) ; } return pq . poll ( ) ; }
Simple algorithm that computes the OR aggregate.

@param bitmaps input bitmaps
@return new bitmap containing the aggregate
Simple algorithm that computes the OR aggregate .