docs: public SampleSubsetSummary estimateSubsetSum(final Predicate<T> predicate) {
  
      if (n_ == 0) {
        return new SampleSubsetSummary(0.0, 0.0, 0.0, 0.0);
      }
  
      double totalWtH = 0.0;
      double hTrueWeight = 0.0;
      int idx = 0;
      for (; idx < h_; ++idx) {
        final double wt = weights_.get(idx);
        totalWtH += wt;
        if (predicate.test(data_.get(idx))) {
          hTrueWeight += wt;
        }
      }
  
      // if only heavy items, we have an exact answer
      if (r_ == 0) {
        return new SampleSubsetSummary(hTrueWeight, hTrueWeight, hTrueWeight, hTrueWeight);
      }
  
      final long numSampled = n_ - h_;
      assert numSampled > 0;
      final double effectiveSamplingRate = r_ / (double) numSampled;
      assert effectiveSamplingRate >= 0.0;
      assert effectiveSamplingRate <= 1.0;
  
      int rTrueCount = 0;
      ++idx; // skip the gap
      for (; idx < (k_ + 1); ++idx) {
        if (predicate.test(data_.get(idx))) {
          ++rTrueCount;
        }
      }
  
      final double lbTrueFraction = pseudoHypergeometricLBonP(r_, rTrueCount, effectiveSamplingRate);
      final double estimatedTrueFraction = (1.0 * rTrueCount) / r_;
      final double ubTrueFraction = pseudoHypergeometricUBonP(r_, rTrueCount, effectiveSamplingRate);
      return new SampleSubsetSummary(
              hTrueWeight + (totalWtR_ * lbTrueFraction),
              hTrueWeight + (totalWtR_ * estimatedTrueFraction),
              hTrueWeight + (totalWtR_ * ubTrueFraction),
              totalWtH + totalWtR_);
    }