This commit is contained in:
techknowlogick
2021-02-28 18:08:33 -05:00
committed by GitHub
parent 030646eea4
commit 47f6a4ec3f
947 changed files with 26119 additions and 7062 deletions

View File

@ -43,3 +43,8 @@ func (s *source) Seed(seed int64) {
s.src.Seed(seed)
s.mu.Unlock()
}
// Shuffle pseudo-randomizes the order of elements.
// n is the number of elements.
// swap swaps the elements with indexes i and j.
func Shuffle(n int, swap func(i, j int)) { pseudo.Shuffle(n, swap) }