ReferencesamplePrimeNumbers

<samplePrimeNumbers/>

<samplePrimeNumbers/> is a Math component that generates random prime numbers from a specified range of values.

Attributes and Properties

Attributes for <samplePrimeNumbers>
AttributeTypeValues
asList = "…""true" "false"
exclude = "…"numberList
maxValue = "…"integer
minValue = "…"integer
numSamples = "…"number
variantDeterminesSeed = "…"boolean"true" "false"
Props for <samplePrimeNumbers name="s">
PropertyType
$s.excludenumberList
$s.maxValueinteger
$s.minValueinteger
$s.numSamplesnumber
$s.variantDeterminesSeedboolean

Example: Default <samplePrimeNumbers

Without any attributes specified, the default sampling range is [2,97][2, 97]. In this example, there are two ways to view different samples: selecting another variant, or refreshing the page.


Example: Using a re-sampling button

Without any attributes specified, the default sampling range is [2,97][2, 97]. The <callAction> button can be used to resample the value.


Attribute Example: numSamples

The <samplePrimeNumbers/> component is used with the numSamples attribute to select multiple random values in the default interval [2,97][2,97].


Attribute Example: minValue, maxValue

The <samplePrimeNumbers/> component is used with the minValue and the maxValue attributes to modify the default selection interval. Note that the interval endpoints provided do no need to be primes.


Attribute Example: exclude

Values can be excluded from the sampled range using the exclude attribute.