Rev 4562 | Rev 5921 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4562 | Rev 5766 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | $lst_alias randperm, randpermute |
4 | $lst_alias randperm, randpermute |
5 | $(lst_syntax)shuffle [even|odd] $emph n $emphend</tt>, or<br> |
5 | $(lst_syntax)shuffle [even|odd] $emph n $emphend</tt>, or<br/> |
6 | <tt>!shuffle [even|odd] $emph list $emphend</tt> |
6 | <tt>!shuffle [even|odd] $emph list $emphend</tt> |
7 | $lst_mean Randomly permutes a set of $emph n $emphend elements. $emph n |
7 | $lst_mean Randomly permutes a set of $emph n $emphend elements. $emph n |
8 | $emphend must be a positive integer not greater than 1024 in the first |
8 | $emphend must be a positive integer not greater than 1024 in the first |
9 | usage, or is the number of items in $emph list $emphend in the second |
9 | usage, or is the number of items in $emph list $emphend in the second |
10 | usage. <br> |
10 | usage. <br/> |
11 | For the first usage, the command |
11 | For the first usage, the command |
12 | returns a comma-separated list $emph i<sub>1</sub>, i<sub>2</sub>, ..., |
12 | returns a comma-separated list $emph i<sub>1</sub>, i<sub>2</sub>, ..., |
13 | i<sub>n</sub>$emphend, where the items $emph i<sub>k</sub>$emphend are |
13 | i<sub>n</sub>$emphend, where the items $emph i<sub>k</sub>$emphend are |
14 | randomly ordered elements of the set $emph {1,2,...,n}$emphend. <br> |
14 | randomly ordered elements of the set $emph {1,2,...,n}$emphend. <br/> |
15 | This command can be used in conjunction with commands |
15 | This command can be used in conjunction with commands |
16 | $(ref1)cmdlist_item_&+cmd_choose=all$(ref2)cmdlist_item_">!item</a>, |
16 | $(ref1)cmdlist_item_&+cmd_choose=all$(ref2)cmdlist_item_">!item</a>, |
17 | $(ref1)cmdlist_line_&+cmd_choose=all$(ref2)cmdlist_line_">!line</a>, |
17 | $(ref1)cmdlist_line_&+cmd_choose=all$(ref2)cmdlist_line_">!line</a>, |
18 | $(ref1)cmdlist_word_&+cmd_choose=all$(ref2)cmdlist_word_">!word</a>, |
18 | $(ref1)cmdlist_word_&+cmd_choose=all$(ref2)cmdlist_word_">!word</a>, |
19 | $(ref1)cmdlist_char_&+cmd_choose=all$(ref2)cmdlist_char_">!char</a>, |
19 | $(ref1)cmdlist_char_&+cmd_choose=all$(ref2)cmdlist_char_">!char</a>, |
20 | to randomly permute items, lines, words, or characters in a string. <br> |
20 | to randomly permute items, lines, words, or characters in a string. <br/> |
21 | For the second usage, a new list with randomly permuted items in |
21 | For the second usage, a new list with randomly permuted items in |
22 | $emph list $emphend is returned. <br> |
22 | $emph list $emphend is returned. <br/> |
23 | In any case, the variable $emph wims_shuffle_order $emphend is set to be |
23 | In any case, the variable $emph wims_shuffle_order $emphend is set to be |
24 | the list $emph i<sub>1</sub>, i<sub>2</sub>, ..., |
24 | the list $emph i<sub>1</sub>, i<sub>2</sub>, ..., |
25 | i<sub>n</sub>$emphend. <br> |
25 | i<sub>n</sub>$emphend. <br/> |
26 | When the optional word $emph even$emphend or |
26 | When the optional word $emph even$emphend or |
27 | $emph odd$emphend is present, only even/odd permutations are produced. |
27 | $emph odd$emphend is present, only even/odd permutations are produced. |
28 | 28 |