Allocates ndslice (vector, matrix, or tensor) and fills it with random numbers. If no variable is specified each element e is generated per rand!(typeof(e)).
Selects a random subsample out of range, containing exactly n elements. The order of elements is the same as in the original range.
Shuffles elements of range.
Partially shuffles the elements of range such that upon returning range[0..n] is a random subset of range and is randomly ordered. range[n..r.length] will contain the elements not in range[0..n]. These will be in an undefined order, but will not be random in the sense that their order after shuffle returns will not be independent of their order before shuffle was called.
Lazy input or forward range containing a random sample. VitterStrides is used to skip elements. Complexity: O(n) Note:
Random sampling utility. Complexity: O(n) References: Jeffrey Scott Vitter, An efficient algorithm for sequential random sampling