1. 23 Jun, 2020 1 commit
  2. 22 Jun, 2020 2 commits
    • Sergio Gelato's avatar
      ITS#8204 Improved RFC2782 shuffle when several, but not all, records have weight 0. · 8006ee58
      Sergio Gelato authored and Quanah Gibson-Mount's avatar Quanah Gibson-Mount committed
      The fallback to a straight Fisher-Yates shuffle needs to occur whenever the
      sum of the *remaining* weights is zero, or else the remaining records will
      not be reordered. Testing only once at the beginning covers the case when
      all weights are zero, and obviously no shuffling is needed when only one
      weight is zero; but other weight combinations are possible, such as (1, 0, 0).
      8006ee58
    • Sergio Gelato's avatar
      ITS#8204 Remove bias towards the first record in RFC2782 shuffle implementation. · ee7502ac
      Sergio Gelato authored and Quanah Gibson-Mount's avatar Quanah Gibson-Mount committed
      Prior to this change, given two records of weight 1 the algorithm would
      return them in the order (0,1) with 100% probability instead of the
      desired 50%. This was due to an off-by-one error in the range test.
      
      srv_rand() returns a float in the range [0.0, 1.0[, so r is an integer in the
      range [0, total[. The correct probability for record 0 to be chosen is
      a[0].weight/total, not (a[0].weight+1)/total.
      ee7502ac
  3. 26 May, 2020 1 commit
  4. 14 May, 2020 1 commit
  5. 28 Apr, 2020 1 commit
  6. 27 Apr, 2020 5 commits
  7. 25 Apr, 2020 1 commit
  8. 23 Apr, 2020 3 commits
  9. 20 Apr, 2020 2 commits
  10. 17 Apr, 2020 3 commits
  11. 16 Apr, 2020 1 commit
  12. 15 Apr, 2020 1 commit
  13. 13 Apr, 2020 1 commit
  14. 12 Apr, 2020 1 commit
  15. 10 Apr, 2020 1 commit
  16. 06 Apr, 2020 1 commit
  17. 02 Apr, 2020 1 commit
  18. 26 Mar, 2020 1 commit
  19. 16 Mar, 2020 1 commit
  20. 07 Mar, 2020 1 commit
  21. 21 Feb, 2020 1 commit
  22. 07 Feb, 2020 3 commits
  23. 30 Jan, 2020 1 commit
  24. 28 Jan, 2020 1 commit
  25. 23 Jan, 2020 3 commits
  26. 19 Jan, 2020 1 commit