truefalse - Maple Help

RandomTools Flavor: truefalse

describe the flavor of either true or false

 Calling Sequence truefalse truefalse(opt)

Parameters

 opt - equation of the form $\mathrm{probability}=p$ where $p$ is a numeric value; specify options for the random truefalse

Description

 • The flavor truefalse describes the values true or false.
 To describe a flavor of a random truefalse, use either truefalse or truefalse(opt) (where opt is described following) as the argument to RandomTools[Generate] or as part of a structured flavor.
 • By default, the flavor truefalse describes the values true and false with equal probability.
 • You can modify the properties of true or false by specifying opt as the equation $\mathrm{probability}=p$, where p is a numeric value between $0$ and $1$ that specifies the probability that the object will be true.

Examples

 > $\mathrm{with}\left(\mathrm{RandomTools}\right):$
 > $\mathrm{Generate}\left(\mathrm{truefalse}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{Generate}\left(\mathrm{list}\left(\mathrm{truefalse}\left(\mathrm{probability}=0.3\right),7\right)\right)$
 $\left[{\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{false}}{,}{\mathrm{true}}{,}{\mathrm{false}}\right]$ (2)