class TRandomGenerator : public tObject;
Random generator.
Use this class to generate streams of random numbers. To achieve independence between two series of random numbers there are three options: 1. create several instances of this class and initialize each with a different seed. (and maybe a different random generator). 2. create a single instance of this class and use leapfroging. 3. create a single instance of this class and use block splitting.
Constructors
| Name | Description |
|---|---|
| TRandomGenerator |
Destructors
| Name | Description |
|---|---|
| ~TRandomGenerator |
Properties
| Name | Type | Description |
|---|---|---|
| BasicRngType | TBasicRandomGenerator | The basic random generator used. |
| BlockStep | int | A parameter to the block splitting method to achieve stream independence. |
| Seed | int | The random generator seed. |
| StreamCount | int | Number of independent random streams. |
| StreamIndependence | TRngStreamIndependence | Specifies the method to achieve random stream independence. |
Methods
| Name | Description |
|---|---|
| GetStream | |
| Init | Initializes random generator. |
| LoadFromFile | Loads random generator state from File. |
| LoadFromStream | Loads random generator state from Src. |
| SaveToFile | Saves random generator state to File. |
| SaveToStream | Saves random generator state to Dst. |
| SetStream | |
| Streams |
Operators
| Name | Description |
|---|---|
| operator[] |