[#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&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;pcgrandomgenerator&period;h&gt;`

[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&period;
| xref:BloombergLP/bdlb/PcgRandomGenerator/seed.adoc[`seed`] 
| Seed this generator with the specified new `initState` and `streamSelector`&period; 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)`&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlb/operator_eq-04c.adoc[BloombergLP::bdlb::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise&period; Two `PcgRandomGenerator` objects have the same value if they would produce the same sequence of random numbers from subsequent invocations of `generate()`&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/operator_not_eq-0a6.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise&period; 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()`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
