This class implements a random number generator (RNG) based on the PCG algorithm.

Synopsis

Declared in <bdlb_pcgrandomgenerator.h>

class PcgRandomGenerator;

Member Functions

Name

Description

PcgRandomGenerator [constructor]

Constructors

generate

Return the next random number in the sequence generated by this object.

seed

Seed this generator with the specified new initState and streamSelector. Note that the sequence of random numbers produced from subsequent invocations of generate() will be the same as that produced by an object created by PcgRandomGenerator(initState, streamSelector).

Friends

Name

Description

BloombergLP::bdlb::operator==

Return true if the specified lhs and rhs objects have the same value, and false otherwise. Two PcgRandomGenerator objects have the same value if they would produce the same sequence of random numbers from subsequent invocations of generate().

Non-Member Functions

Name

Description

operator!=

Return true if the specified lhs and rhs objects do not have the same value, and false otherwise. Two PcgRandomGenerator objects do not have the same value if they would not produce the same sequence of random numbers from subsequent invocations of generate().

Created with MrDocs