random_selection chooses n items at random from a random access iterator range which is useful to produce degenerate input data sets with multiple entries of identical items.
#include <CGAL/random_selection.h>
template <class RandomAccessIterator, class Size, class OutputIterator, class Random> | ||||
OutputIterator |
| |||
chooses a random item from the range [first,last) and
writes it to result, each item from the range with equal
probability, and repeats this n times, thus writing n items to
result.
A single random number is needed from rnd for each item.
Returns the value of result after inserting the n items.
|