Function for Setting a Random Number Generation Algorithm
Change the random number generation algorithm in the input policy and reset the random seed.
Interface Definition
KmlVslResult kml_vsl_setRNGKind(VslPolicy *policy, RNGtype newkind);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
policy |
Pointer to data of the VslPolicy type. |
Pointer to the random number generator structure. |
Output |
newkind |
RNGtype |
Algorithm for generating random numbers. |
Input |
Dependency
#include "kvsl.h"
Example
#include <time.h>
#include <stdlib.h>
#include "kvsl.h"
int main()
{
VslPolicy *policy;
kml_vsl_init(&policy, LECUYER_CMRG, time(NULL));
kml_vsl_setRNGKind(policy, WICHMANN_HILL);
kml_vsl_destroy(policy);
}
Parent topic: Function Syntax