File: irandstream.yo

package info (click to toggle)
bobcat 6.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,960 kB
  • sloc: cpp: 18,954; fortran: 5,617; makefile: 2,787; sh: 659; perl: 401; ansic: 26
file content (68 lines) | stat: -rw-r--r-- 2,367 bytes parent folder | download | duplicates (3)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
includefile(include/header)

COMMENT(manpage, section, releasedate, archive, short name)
manpage(FBB::IRandStream)(3bobcat)(_CurYrs_)(libbobcat-dev__CurVers_)
                    (Random numbers istream)

manpagename(FBB::IRandStream)(Istream producing random numbers)

manpagesynopsis()
    bf(#include <bobcat/irandstream>)nl()
    Linking option: tt(-lbobcat)

manpagedescription()
    bf(FBB::IRandStream) objects may be used to extract random numbers in a
given range from a stream.

includefile(include/namespace)

manpagesection(INHERITS FROM)
    bf(std::istream), nl()
    bf(FBB::RandBuffer) (private)


manpagesection(CONSTRUCTORS)
    itemization(
    itb(IRandStream(int max))
    This bf(FBB::IRandStream()) constructor initializes the random generator.
The default seed (i.e., 1) for the bf(srand)(3) function is used, meaning that
every new run of the program will generate the same sequence of random
values. Another constructor (see below) is provided when this is not
considered appropriate. Random values between 1 and tt(max) (inclusive) are
returned.

    itb(IRandStream(int min, int max))
    This bf(FBB::IRandStream()) constructor initializes the random generator.
The default seed (i.e., 1) for the bf(srand)(3) function is used, meaning that
every new run of the program will generate the same sequence of random
values. Another constructor (see below) is provided when this is not
considered appropriate. Random values between tt(min) and tt(max) (inclusive)
are returned.

    itb(IRandStream(int min, int max, size_t seed))
    This bf(FBB::IRandStream()) constructor initializes the random
generator. The seed is used to initialize the random number generator. To start
the random generator at some unpredictable point, tt(time(0)) could be used.
Random values between tt(min) and tt(max) (inclusive) are returned.
    )

    Copy and move constructors (and assignment operators) are not available.

manpagesection(INHERITED MEMBERS)

    Since the class uses public derivation from bf(std::istream), all members
of this class can be used.

manpagesection(EXAMPLE)
    verbinclude(../../irandstream/driver/driver.cc)

manpagefiles()
    em(bobcat/irandstream) - defines the class interface

manpageseealso()
    bf(bobcat)(7), bf(randbuf)(3bobcat), bf(randommt)(3bobcat)

manpagebugs()
    None Reported.

includefile(include/trailer)