Record TGenericRandomNumberGenerator
Unit
Declaration
type generic TGenericRandomNumberGenerator<TQWordGenerator> = record
Description
Generic random number generator. Turns any qword generating RNG into a RNG for other types
Overview
Methods
![]() |
procedure randomize; |
![]() |
procedure randomize(seed: QWord); |
![]() |
function nextQWord: QWord; inline; |
![]() |
function nextDouble: Double; |
![]() |
function next(const l: longint): longint; |
![]() |
function next(const l: qword): qword; |
![]() |
function next(const l: int64): int64; |
![]() |
procedure shuffle(var a: array of integer); |
![]() |
procedure shuffle(var a: array of int64); |
Description
Methods
![]() |
procedure randomize; |
|
Initializes the RNG | |
![]() |
procedure randomize(seed: QWord); |
|
Initializes the RNG with a seed | |
![]() |
function nextQWord: QWord; inline; |
|
Returns a random QWord | |
![]() |
function nextDouble: Double; |
|
Returns a random double between 0 and 1 | |
![]() |
function next(const l: longint): longint; |
|
Returns a random number in [0, l[ | |
![]() |
function next(const l: qword): qword; |
|
Returns a random number in [0, l[ | |
![]() |
function next(const l: int64): int64; |
|
Returns a random number in [0, l[ | |
![]() |
procedure shuffle(var a: array of integer); |
|
Orders an array randomly | |
![]() |
procedure shuffle(var a: array of int64); |
|
Orders an array randomly | |
Generated by PasDoc 0.16.0.
