mirror of
https://github.com/apple/swift-algorithms
synced 2026-11-24 04:17:48 +00:00
18 lines
458 B
Markdown
18 lines
458 B
Markdown
# Random Sampling
|
|
|
|
Choose a specified number of random elements from a sequence or collection.
|
|
|
|
## Topics
|
|
|
|
### Random Sampling
|
|
|
|
- ``Swift/Sequence/randomSample(count:)``
|
|
- ``Swift/Collection/randomSample(count:)``
|
|
- ``Swift/Collection/randomStableSample(count:)``
|
|
|
|
### Random Sampling with a Generator
|
|
|
|
- ``Swift/Sequence/randomSample(count:using:)``
|
|
- ``Swift/Collection/randomSample(count:using:)``
|
|
- ``Swift/Collection/randomStableSample(count:using:)``
|