shuffle

Performs a linear scan of buf from [2 .. buf.length$(RP), exchanging each element with an element in the range [0 .. pos$(RP), where pos represents the current array position.

  1. void shuffle(Elem[] buf, Oper1A oper)
    version(TangoDoc)
    void
    shuffle
  2. template shuffle(Buf, Oper = RandOper!())

Parameters

buf Elem[]

The array to shuffle.

oper Oper1A

The randomize operation, which should return a number in the range [0 .. N$(RP) for any supplied value N. This routine may be any callable type.

Meta