Function for Setting a Random Seed
Reset the random seed in the input policy.
Interface Definition
KmlVslResult kml_vsl_setSeed(VslPolicy *policy, uint32_t seed);
Parameters
Parameter |
Type |
Description |
Input/Output |
|---|---|---|---|
policy |
Pointer to data of the VslPolicy type. |
Pointer to the random number generator structure. |
Output |
seed |
uint32_t |
Random number seed. |
Input |
Dependency
#include "kvsl.h"
Example
#include <stdio.h>
#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_setSeed(policy, 0);
kml_vsl_destroy(policy);
}
Parent topic: Function Syntax