]> git.donarmstrong.com Git - fastq-tools.git/blob - src/rng.h
A program to randomly sample reads from a fastq file.
[fastq-tools.git] / src / rng.h
1 /*
2  * This file is part of fastq-tools.
3  *
4  * Copyright (c) 2011 by Daniel C. Jones <dcjones@cs.washington.edu>
5  *
6  * rng :
7  * Robust pseudo-random number generation.
8  *
9  */
10
11 #ifndef FASTQ_TOOLS_RNG_H
12 #define FASTQ_TOOLS_RNG_H
13
14 typedef struct rng_t_ rng_t;
15
16 rng_t* fastq_rng_alloc();
17 void   fastq_rng_free(rng_t*);
18 void fastq_rng_seed(rng_t*, unsigned long seed);
19
20 /* Uniform integer in [0, k-1] */
21 unsigned long fastq_rng_uniform_int(rng_t*, unsigned long k);
22
23 #endif
24