proxy.golang.org : github.com/mohae/shuffle
Shuffle provides crypto/rand based shuffling (randomization) of collections using the Fisher-Yates (Knuth) shuffling algorithm. Functions for shuffling slices of non-composite types are provided, or you can implement the Shuffler interface and shuffle using the shuffle.Interface() func. Shuffling is performed on the received slice; nothing is returned and no additional allocations, aside from those caused by using crypto/rand. If using a math/rand based shuffle is good enough, see the github.com/mohae/shuffle/quick package, which provides a quick, pseudo-random shuffle.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/mohae/shuffle
License: MIT
Latest release: almost 9 years ago
First release: almost 9 years ago
Namespace: github.com/mohae
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 30 days ago