zl.scramble Reference

Scramble a list

zl.scramble

Description

zl.scramble accepts a list in either inlet. A list in the left inlet will cause the object to immediately output a scrambled version of the input-list (a list containing the same elements as the input-list but in a randomized order). A list in the right inlet will set the input-list without causing output (a subsequent bang received in the left inlet will cause a randomized version of the right-input list to be sent out the object's left outlet). On receiving a bang or list in the left inlet, a list of the reordered indexes will be sent out the objects' right outlet.

Arguments

initial-list [list]

Optional

Initial list

Attributes

fuzzy [atom] (default: 0.)

Fuzzy floating-point comparison epsilon

zlmaxsize [atom_long]

Maximum List Length

Common Box Attributes

Messages

bang

A bang input to the left inlet will scramble the stored list and output it.

int

TEXT_HERE

float

TEXT_HERE

list

In left inlet:
Store, scramble and output list.

In right inlet:
Sets items to scramble (does not cause output).

anything

TEXT_HERE

mode

The word 'mode' followed by one of the following words will set the mode of the object:
change, compare, delace, ecils, group, indexmap, iter, join, lace, len, lookup, median, mth, nth, queue, reg, rev, rot, scramble, sect, slice, sort, stack, stream, sub, sum, swap, thin, union, or unique.

See the reference for the corresponding mode for more information.

zlclear

Clears the currently held list.

Output

anything

Out left outlet:
Scrambled list.

Out right outlet:
Reordered indexes of list.

See Also

Name Description
zl
zl.change
zl.compare
zl.delace
zl.ecils
zl.filter
zl.group
zl.indexmap
zl.iter
zl.join
zl.lace
zl.len
zl.lookup
zl.median
zl.mth
zl.nth
zl.queue
zl.reg
zl.rev
zl.rot
zl.sect
zl.slice
zl.sort
zl.stack
zl.stream
zl.sub
zl.sum
zl.swap
zl.thin
zl.union
zl.unique