public long estimateNumDistinctValuesPCSA() {
    double numDistinctValues = 0.0;
    long S = 0;

    for (int i=0; i < numBitVectors; i++) {
      int index = 0;
      while (bitVector[i].get(index) && index < BIT_VECTOR_SIZE) {
        index = index + 1;
      }
      S = S + index;
    }

    numDistinctValues = ((numBitVectors/PHI) * Math.pow(2.0, S/numBitVectors));
    return ((long)numDistinctValues);
  }
Resets a distinctValueEstimator object to its original state.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/common/ndv/fm/FMSketch.java