make note about non-determism

This commit is contained in:
NunoSempere 2024-02-25 18:17:46 -03:00
parent 1b552ffc9a
commit c61bae984c

View File

@ -81,7 +81,7 @@ func drawFromDistributionWithReplacement(d pplKnownDistrib, r src) int64 {
for i, p := range d { for i, p := range d {
sum += p sum += p
if pp <= sum { if pp <= sum {
return int64(i) return int64(i) // this introduces some non-determinism, as order of maps in go isn't guaranteed
} }
} }