describe a set of random objects - Maple Help

Home : Support : Online Help : Programming : Random Objects : RandomTools package : Flavors : RandomTools/flavor/set

RandomTools Flavor: set - describe a set of random objects

 Calling Sequence set(flav, n)

Parameters

 flav - random flavor n - non-negative integer

Description

 • The flavor set describes a set containing n entries where the entries of this set are described by the given random flavor flav.  The final set can contain fewer than n entries if the same object is generated more than once.
 This flavor can be used as an argument to RandomTools[Generate] or as part of a structured flavor.

Examples

 > $\mathrm{with}\left(\mathrm{RandomTools}\right):$
 > $\mathrm{Generate}\left(\mathrm{set}\left(\mathrm{posint}\left(\mathrm{range}=10\right),10\right)\right)$
 $\left\{{1}{,}{2}{,}{4}{,}{5}{,}{6}{,}{7}{,}{8}{,}{10}\right\}$ (1)
 > $\mathrm{Generate}\left(\mathrm{set}\left(\mathrm{rational}\left(\mathrm{denominator}=6\right),10\right)\right)$
 $\left\{{-}\frac{{2}}{{3}}{,}{-}\frac{{1}}{{2}}{,}{-}\frac{{1}}{{3}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{3}}{,}\frac{{2}}{{3}}{,}\frac{{5}}{{6}}\right\}$ (2)