diff options
Diffstat (limited to 'src/distribution.h')
| -rw-r--r-- | src/distribution.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/distribution.h b/src/distribution.h new file mode 100644 index 0000000..c4b20b9 --- /dev/null +++ b/src/distribution.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifndef INCLUDED_DISTRIBUTION_H | ||
| 2 | #define INCLUDED_DISTRIBUTION_H | ||
| 3 | |||
| 4 | // Multivariate Pólya distribution | ||
| 5 | typedef struct distribution | ||
| 6 | { | ||
| 7 | unsigned int n; | ||
| 8 | unsigned int b; | ||
| 9 | unsigned int r; | ||
| 10 | int c; | ||
| 11 | double p0; | ||
| 12 | }* DISTRIBUTION; | ||
| 13 | |||
| 14 | void distribution_init (DISTRIBUTION dist, | ||
| 15 | unsigned int n, | ||
| 16 | unsigned int b, | ||
| 17 | unsigned int r, | ||
| 18 | int c); | ||
| 19 | int distribution_rand (DISTRIBUTION dist); | ||
| 20 | double distribution_nrand (DISTRIBUTION dist); | ||
| 21 | |||
| 22 | #endif | ||
