public static double estimateSelectivity(
      final BitmapIndex bitmapIndex,
      final IntList bitmaps,
      final long totalNumRows
  )
  {
    long numMatchedRows = 0;
    for (int i = 0; i < bitmaps.size(); i++) {
      final ImmutableBitmap bitmap = bitmapIndex.getBitmap(bitmaps.getInt(i));
      numMatchedRows += bitmap.size();
    }

    return Math.min(1., (double) numMatchedRows / totalNumRows);
  }
public static double estimateSelectivity ( final BitmapIndex bitmapIndex , final IntList bitmaps , final long totalNumRows ) { long numMatchedRows = 0 ; for ( int i = 0 ; i < bitmaps . size ( ) ; i ++ ) { final ImmutableBitmap bitmap = bitmapIndex . getBitmap ( bitmaps . getInt ( i ) ) ; numMatchedRows += bitmap . size ( ) ; } return Math . min ( 1. , ( double ) numMatchedRows / totalNumRows ) ; }
Return an estimated selectivity for bitmaps for the dimension values given by dimValueIndexes.

@param bitmapIndex  bitmap index
@param bitmaps      bitmaps to extract, by index
@param totalNumRows number of rows in the column associated with this bitmap index

@return estimated selectivity