File: sample.yo

package info (click to toggle)
c%2B%2B-annotations 13.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,576 kB
  • sloc: cpp: 25,297; makefile: 1,523; ansic: 165; sh: 126; perl: 90; fortran: 27
file content (24 lines) | stat: -rw-r--r-- 949 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
    hi(sample) hi(shuffle)
    itemization(
        it() Header file: tt(<algorithm>)
        it() Function prototype:
        itemization(
            itt(OutputIterator sample(InputIterator first, InputIterator last,
                       OutputIterator out, size_t sampleSize,
                       Generator &&generator);)
        )
        it() Description:
        itemization(
            it() tt(sampleSize) elements are randomly selected (without
replacement) from the input range rangett(first, last), and copied to the
destination range starting at tt(out) and ending at the function's return
value. If tt(sampleSize >= (last - first)) all elements are selected. The
tt(generator) is a (uniform) random number generator, like the ti(mt19937)
mercenne twister.
        )
        See also ti(shuffle):
            (url(cppreference)(https://en.cppreference.com)).

        it() Example:
        verbinclude(-as4 examples/sample.cc)
    )