vector.
Irrespective of the value of
sortorder, no checks are made on the sorted status of
wt, e.g., it is possible to supply
, even when
wt is not sorted. In such cases the
wt array will not be sorted internally, but nag_rand_sample_unequal (g05nec) will still work correctly except, possibly, in cases of extreme weight values.
It is usually more efficient to specify a value of
sortorder that is consistent with the status of
wt.