docs: public static <I extends ScoreIter> XYCurve materializeROC(Predicate<? super I> predicate, I iter) {
      int poscnt = 0, negcnt = 0;
      XYCurve curve = new XYCurve("False Positive Rate", "True Positive Rate");
  
      // start in bottom left
      curve.add(0.0, 0.0);
  
      while(iter.valid()) {
        // positive or negative match?
        do {
          if(predicate.test(iter)) {
            ++poscnt;
          }
          else {
            ++negcnt;
          }
          iter.advance();
        } // Loop while tied:
        while(iter.valid() && iter.tiedToPrevious());
        // Add a new point.
        curve.addAndSimplify(negcnt, poscnt);
      }
      // Ensure we end up in the top right corner.
      // Simplification will skip this if we already were.
      curve.addAndSimplify(negcnt, poscnt);
      curve.rescale(1. / negcnt, 1. / poscnt);
      return curve;
    }