src/main/java/com/googlecode/javaewah32/FastAggregation32.java
public static void bufferedandWithContainer(
            final BitmapStorage32 container, final int bufSize,
            final EWAHCompressedBitmap32... bitmaps) {

        java.util.LinkedList<IteratingBufferedRunningLengthWord32> al = new java.util.LinkedList<IteratingBufferedRunningLengthWord32>();
        for (EWAHCompressedBitmap32 bitmap : bitmaps) {
            al.add(new IteratingBufferedRunningLengthWord32(bitmap));
        }
        int[] hardbitmap = new int[bufSize * bitmaps.length];

        for (IteratingRLW32 i : al)
            if (i.size() == 0) {
                al.clear();
                break;
            }

        while (!al.isEmpty()) {
            Arrays.fill(hardbitmap, ~0);
            int effective = Integer.MAX_VALUE;
            for (IteratingRLW32 i : al) {
                int eff = IteratorAggregation32.inplaceand(
                        hardbitmap, i);
                if (eff < effective)
                    effective = eff;
            }
            for (int k = 0; k < effective; ++k)
                container.addWord(hardbitmap[k]);
            for (IteratingRLW32 i : al)
                if (i.size() == 0) {
                    al.clear();
                    break;
                }
        }
    }
public static void bufferedandWithContainer(
            final BitmapStorage32 container, final int bufSize,
            final EWAHCompressedBitmap32... bitmaps) {

        java.util.LinkedList<IteratingBufferedRunningLengthWord32> al = new java.util.LinkedList<IteratingBufferedRunningLengthWord32>();
        for (EWAHCompressedBitmap32 bitmap : bitmaps) {
            al.add(new IteratingBufferedRunningLengthWord32(bitmap));
        }
        int[] hardbitmap = new int[bufSize * bitmaps.length];

        for (IteratingRLW32 i : al)
            if (i.size() == 0) {
                al.clear();
                break;
            }

        while (!al.isEmpty()) {
            Arrays.fill(hardbitmap, ~0);
            int effective = Integer.MAX_VALUE;
            for (IteratingRLW32 i : al) {
                int eff = IteratorAggregation32.inplaceand(
                        hardbitmap, i);
                if (eff < effective)
                    effective = eff;
            }
            for (int k = 0; k < effective; ++k)
                container.addWord(hardbitmap[k]);
            for (IteratingRLW32 i : al)
                if (i.size() == 0) {
                    al.clear();
                    break;
                }
        }
    }
public static void bufferedandWithContainer ( final BitmapStorage32 container , final int bufSize , final EWAHCompressedBitmap32 ... bitmaps ) { java . util . LinkedList < IteratingBufferedRunningLengthWord32 > al = new java . util . LinkedList < IteratingBufferedRunningLengthWord32 > ( ) ; for ( EWAHCompressedBitmap32 bitmap : bitmaps ) { al . add ( new IteratingBufferedRunningLengthWord32 ( bitmap ) ) ; } int [ ] hardbitmap = new int [ bufSize * bitmaps . length ] ; for ( IteratingRLW32 i : al ) if ( i . size ( ) == 0 ) { al . clear ( ) ; break ; } while ( ! al . isEmpty ( ) ) { Arrays . fill ( hardbitmap , ~ 0 ) ; int effective = Integer . MAX_VALUE ; for ( IteratingRLW32 i : al ) { int eff = IteratorAggregation32 . inplaceand ( hardbitmap , i ) ; if ( eff < effective ) effective = eff ; } for ( int k = 0 ; k < effective ; ++ k ) container . addWord ( hardbitmap [ k ] ) ; for ( IteratingRLW32 i : al ) if ( i . size ( ) == 0 ) { al . clear ( ) ; break ; } } }
Compute the and aggregate using a temporary uncompressed bitmap.

This function does not seek to match the "sizeinbits" attributes
of the input bitmaps.

@param container where the aggregate is written
@param bufSize   buffer size used during the computation in 64-bit
words (per input bitmap)
@param bitmaps   the source bitmaps
Compute the and aggregate using a temporary uncompressed bitmap .