[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.5 LM:Set Assign (Pick)

The LM:Set Assign module randomly selects elements without replacement from one array and assigns them to another. Without replacement implies that subsequent picks from the same source arrays will not pick the same elements; the pool can be reset with the LM:Randomize module (see section LM:Randomize Sets). The elements are assigned to the destination arrays starting at index 1.

LM:Set Assign user interface configured with an example:

images/lm-assignx

Length: the number of elements to pick. Here, the length is specified as 5.

Parallel Assign: by default, when multiple arrays are listed, Bunao randomly selects indices only from the first source array, and uses these same indices for the remaining assignments, so they are performed "in parallel" with the first. If this box is unchecked, each assignment proceeds independently of the others. Here, the box is checked, meaning the assignment will proceed in parallel.

Save Pick List: (Optional) the name of an array where Bunao will store the indices (not elements) it chooses of the source array. Here the Save Pick List is set to `Y1'. If Parallel Assign is unchecked, Save Pick List only stores the indices selected for the first assignment.

Multiple source/destination pairs may be specified using the Sets listcontrol. Here, two pairs of arrays are specified.

Source: the name of the source array. Here, the two source arrays are `A1' and `A2'.

Dest: the name of the destination array. Here, the corresponding destination arrays are `X1' and `X2'.

If the 5 source indices in this example are randomly chosen by Bunao to be, say, `2,6,14,28,31', then the following assignments will happen by this instance of the Pick module:

 
A1(2)  --> X1(1)
A1(6)  --> X1(2)
A1(14) --> X1(3)
A1(28) --> X1(4)
A1(31  --> X1(5)

Because parallel assignment is specified, the same source indices are used to assign array `X2' from `A2'.

 
A2(2)  --> X2(1)
A2(6)  --> X2(2)
A2(14) --> X2(3)
A2(28) --> X2(4)
A2(31  --> X2(5)

And the pick list will be saved in `Y1':

 
Y1(1) = 2
Y1(2) = 6
Y1(3) = 14
Y1(4) = 28
Y1(5) = 31

LM:Set Assign attribute list:
Attribute Type Default Description
len integer `1' number of items to draw
par boolean `1' (parallel) parallel or independent assignment
pickdest array name (blank) array to store pick list in
sets.1 array name (blank) source array to draw from
sets.2 array name (blank) destination array to create


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October, 28 2005 using texi2html