> The new tests don't test the instability of the reservoir sampling algorithm. 
> Should they?


Yes - but I won't hold up accepting this because that test is missing.

The phrase in the standard "stable if and only if"...


================
Comment at: 
test/std/experimental/algorithms/alg.random.sample/sample.stable.pass.cpp:44
@@ +43,3 @@
+    for (int j = 1; j < kSampleSize; ++j)
+      assert(oa[j] > oa[j - 1]);
+  }
----------------
Couldn't this just be a call to `std::is_sorted(first, last)` ?

http://reviews.llvm.org/D9044

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to