randomWH API
Generation of Pseudo-Random Variates
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
randomWH.h
Go to the documentation of this file.
1
95
#ifndef _RANDOMWH_H
96
#define _RANDOMWH_H
99
#include <stdio.h>
100
#include <stdlib.h>
101
#include <math.h>
107
enum
BOOLEAN
108
{
109
isfalse
,
110
istrue
111
};
112
113
114
147
typedef
struct
generator
{
151
long
int
x
;
152
long
int
y
;
153
long
int
z
;
154
long
int
t
;
155
enum
BOOLEAN
initialised
;
198
void (*
init
)(
struct
generator
*
self
,
long
int
x
,
long
int
y
,
long
int
z
,
long
int
t
);
248
double (*
randomWH
)(
struct
generator
*
self
);
289
long
int
* (*read)(
struct
generator
*
self
);
290
324
enum
BOOLEAN
(*
bernoulli
)(
struct
generator
*
self
,
double
prob);
325
326
360
long
int (*
geometric
)(
struct
generator
*
self
,
double
prob);
361
395
long
int (*
binomial
)(
struct
generator
*
self
,
long
int
trials,
double
prob);
396
432
long
int (*
fairdie
)(
struct
generator
*
self
,
long
int
lower_inclusive,
long
int
upper_inclusive);
433
436
}
Congruence
;
437
438
439
void
Congruence_init
(
Congruence
*
self
,
long
int
x
,
long
int
y
,
long
int
z
,
long
int
t
);
440
long
int
*
Congruence_read
(
Congruence
*
self
);
441
double
randomWH_32
(
Congruence
*
self
);
442
double
randomWH_64
(
Congruence
*
self
);
443
double
randomWH_null
(
Congruence
*
self
);
444
void
randomWH_error
(
const
char
* message);
445
long
int
randomWH_geometric
(
Congruence
*
self
,
double
prob);
446
enum
BOOLEAN
randomWH_bernoulli
(
Congruence
*
self
,
double
prob);
447
long
int
randomWH_binomial
(
Congruence
*
self
,
long
int
trials,
double
prob);
448
long
int
randomWH_fairdie
(
Congruence
*
self
,
long
int
lower_inclusive,
long
int
upper_inclusive);
449
450
491
extern
Congruence
congruent
;
492
493
494
495
#endif
/*_RANDOMWH_H */
Generated on Wed Feb 26 2014 16:14:05 for randomWH API by
1.8.4