BloombergLP::bdlb::PcgRandomGenerator::PcgRandomGenerator

Create a PcgRandomGenerator seeded with the specified initState and streamSelector.

Synopsis

Declared in <bdlb_pcgrandomgenerator.h>

PcgRandomGenerator(
    uint64_t initState,
    uint64_t streamSelector);

Description

Create a PcgRandomGenerator seeded with the specified initState and streamSelector. The highest-order bit of streamSelector is ignored. Note that instances created with identical seeds produce the same sequence from subsequent generate() calls.

Parameters

NameDescription
initStateinitial state for the generator
streamSelectorstream selector for the generator sequence