Legofit
infers population history from nucleotide site patterns.
param.h
1#ifndef LEGOFIT_PARAM_H
2#define LEGOFIT_PARAM_H
3
4#include "typedefs.h"
5#include "tinyexpr.h"
6#include "strptrmap.h"
7#include <stdio.h>
8#include <gsl/gsl_randist.h>
9
10#define NAMESIZE 40
11
12struct Param {
13 char *name; // name of parameter
14 double value;
15 double low, high; // bounds;
16 unsigned type; // (FREE | TWON) etc
17 char *formula; // formula for constrained variable
18 te_expr *constr; // expression tree for constrained variable
19};
20
21double Param_getTrialValue(const Param *self, gsl_rng *rng);
22double Param_getValue(const Param *self);
23int Param_compare(const Param *lhs, const Param *rhs);
24int Param_isFree(const Param *self);
25int Param_setValue(Param *self, double value);
26void Param_compileConstraint(Param *self, StrPtrMap *te_pars);
27void Param_constrain(Param *par);
28void Param_copy(Param *to, const Param *from);
29void Param_freePtrs(Param *self);
30void Param_move(Param *to, Param *from);
31Param *Param_new(const char *name, double value,
32 double low, double high,
33 unsigned type, const char *formula);
34void Param_sanityCheck(const Param *self, const char *file, int line);
35
36#endif
Definition: param.h:12
The hash table.
Definition: strptrmap.c:38
Definition: tinyexpr.h:39