Changed reader.getMaxUid() and reader.getMaxIid so they really return
the maximum id. And adapted the rest.
Optimized auc.
Tested AUC.