public static MutableRoaringBitmap naive_and(MutableRoaringBitmap... bitmaps) {
    if (bitmaps.length == 0) {
      return new MutableRoaringBitmap();
    }
    MutableRoaringBitmap answer = bitmaps[0].clone();
    for (int k = 1; k < bitmaps.length; ++k) {
      answer.and(bitmaps[k]);
    }
    return answer;
  }
public static MutableRoaringBitmap naive_and ( MutableRoaringBitmap ... bitmaps ) { if ( bitmaps . length == 0 ) { return new MutableRoaringBitmap ( ) ; } MutableRoaringBitmap answer = bitmaps [ 0 ] . clone ( ) ; for ( int k = 1 ; k < bitmaps . length ; ++ k ) { answer . and ( bitmaps [ k ] ) ; } return answer ; }
Compute overall AND between bitmaps two-by-two.

This function runs in linear time with respect to the number of bitmaps.

@param bitmaps input bitmaps
@return aggregated bitmap