aboutsummaryrefslogtreecommitdiff
path: root/src/distribution.h
blob: c4b20b9a61f03b180506d33cfc38a34a57666a6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef INCLUDED_DISTRIBUTION_H
#define INCLUDED_DISTRIBUTION_H

// Multivariate Pólya distribution
typedef struct distribution
{
  unsigned int n;
  unsigned int b;
  unsigned int r;
           int c;
  double       p0;
}* DISTRIBUTION;

void distribution_init (DISTRIBUTION dist,
                        unsigned int n,
                        unsigned int b,
                        unsigned int r,
                                 int c);
int distribution_rand (DISTRIBUTION dist);
double distribution_nrand (DISTRIBUTION dist);

#endif