randomSubset(x, n)
randomSubset x
When n is given, then a random subset x of cardinality n is returned.
|
Otherwise, a random subset of arbitrary cardinality is returned.
|
|
|
If x is an integer, then a subset of $\{0,\ldots,x - 1\}$ is returned.
|
|
Knuth, Donald E. The Art of Computer Programming: Seminumerical Algorithms, Volume 2. Addison-Wesley Professional, 2014. (Algorithm S, Section 3.4.2)
The object randomSubset is a method function.
The source of this document is in Macaulay2Doc/functions/randomSubset-doc.m2:41:0.