[#BloombergLP-bdlb-PcgRandomGenerator] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::PcgRandomGenerator :relfileprefix: ../../ :mrdocs: This class implements a random number generator (RNG) based on the PCG algorithm. == Synopsis Declared in `<bdlb_pcgrandomgenerator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class PcgRandomGenerator; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/PcgRandomGenerator/2constructor-03.adoc[`PcgRandomGenerator`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bdlb/PcgRandomGenerator/generate.adoc[`generate`] | Return the next random number in the sequence generated by this object. | xref:BloombergLP/bdlb/PcgRandomGenerator/seed.adoc[`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 [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlb/operator_eq-04c.adoc[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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlb/operator_not_eq-0a6.adoc[`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()`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#