File: uniformint.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 (37 lines) | stat: -rw-r--r-- 1,257 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
25
26
27
28
29
30
31
32
33
34
35
36
37
The ti(uniform_int_distribution<IntType = int>) can be used to select integral
values randomly from a range of uniformly distributed integral values.

It has two parameters, tt(a) and tt(b), specifying, respectively, the lowest
value that can be returned and the highest value that can be returned.

Defined types:
        verb(    using result_type = IntType;

    struct param_type
    {
        explicit param_type(IntType a = 0, IntType b = max(IntType));

        IntType a() const;
        IntType b() const;
    };)

Constructors and members:
    itemization(
    itt(uniform_int_distribution<>(IntType a = 0, IntType b = max(IntType)))
        constructs a uniform_int distribution for the specified range of
        values.
    itt(uniform_int_distribution<>(param_type const &param))
        constructs a uniform_int distribution according to the values stored in
        the tt(param) struct.
    itt(IntType a() const)nl()
        returns the distribution's tt(a) parameter;
    itt(IntType b() const)nl()
        returns the distribution's tt(b) parameter;
    itt(result_type min() const)nl()
        returns the distribution's tt(a) parameter;
    itt(result_type max() const)nl()
        returns the distribution's tt(b) parameter;
    )