cachesim
A cache simulator
Data Structures | Functions
random.c File Reference
#include "random.h"
#include "common.h"
#include <stdlib.h>
#include <time.h>

Go to the source code of this file.

Data Structures

struct  Random
 Дескриптор ГПСЧ на основе стандартной функции rand() More...

Functions

Randomrandom_free (Random *rnd)
int random_next (Random *rnd, int n)
Randomrandom_create (ConfigFile *cfg)

Function Documentation

Random* random_create ( ConfigFile cfg)

Создать дескриптор генератора случайных чисел.

Parameters:
cfgКонфигурационные параметры
Returns:
Новый дескриптор случайных чисел

Definition at line 41 of file random.c.

Random* random_free ( Random rnd)

Definition at line 20 of file random.c.

int random_next ( Random rnd,
int  n 
)

Definition at line 29 of file random.c.