Legofit
infers population history from nucleotide site patterns.
boot.h
Go to the documentation of this file.
1
9#ifndef LEGO_BOOT_H
10# define LEGO_BOOT_H
11
12# include "typedefs.h"
13# include <gsl/gsl_rng.h>
14
15#define DEF_BOOT_BLOCK_SIZE 500
16
17Boot *Boot_new(int nchr, long nsnp[nchr], long nrep, int npat,
18 long blocksize, gsl_rng * rng);
19void Boot_free(Boot * self);
20void Boot_add(Boot *self, int chr, long snpndx, int pat, double z);
21void Boot_aggregate(Boot * self, int rep, int npat,
22 double count[npat]);
23void Boot_print(const Boot * self, FILE * ofp);
24#ifndef NDEBUG
25void Boot_sanityCheck(const Boot * self, const char *file, int line);
26#endif
27
28void confidenceBounds(double *lowBnd, double *highBnd, double confidence,
29 long len, double v[len]);
30
31# ifndef NDEBUG
32unsigned Boot_multiplicity_slow(Boot * self, long snp, long rep);
33# endif
34#endif
Boot * Boot_new(int nchr, long nsnp[nchr], long nrep, int npat, long blocksize, gsl_rng *rng)
Constructor for class Boot.
Definition: boot.c:62
void Boot_free(Boot *self)
Destructor.
Definition: boot.c:232
void Boot_print(const Boot *self, FILE *ofp)
Print a Boot object.
Definition: boot.c:328
void Boot_add(Boot *self, int chr, long snpndx, int pat, double z)
Add one site pattern contribution to a Boot structure.
Definition: boot.c:216
void Boot_aggregate(Boot *self, int rep, int npat, double count[npat])
Add to an array the site pattern counts from a bootstrap replicate.
Definition: boot.c:256
void confidenceBounds(double *lowBnd, double *highBnd, double confidence, long len, double v[len])
Calculate confidence bounds from a vector of values representing samples drawn from the sampling dist...
Definition: boot.c:318
Contains the all data involved in a moving blocks bootstrap.
Definition: boot.c:34