Legofit
infers population history from nucleotide site patterns.
Loading...
Searching...
No Matches
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
12
struct
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
21
double
Param_getTrialValue(
const
Param
*self, gsl_rng *rng);
22
double
Param_getValue(
const
Param
*self);
23
int
Param_compare(
const
Param
*lhs,
const
Param
*rhs);
24
int
Param_isFree(
const
Param
*self);
25
int
Param_setValue(
Param
*self,
double
value);
26
void
Param_compileConstraint(
Param
*self,
StrPtrMap
*te_pars);
27
void
Param_constrain(
Param
*par);
28
void
Param_copy(
Param
*to,
const
Param
*from);
29
void
Param_freePtrs(
Param
*self);
30
void
Param_move(
Param
*to,
Param
*from);
31
Param
*Param_new(
const
char
*name,
double
value,
32
double
low,
double
high,
33
unsigned
type,
const
char
*formula);
34
void
Param_sanityCheck(
const
Param
*self,
const
char
*file,
int
line);
35
36
#endif
Param
Definition
param.h:12
StrPtrMap
The hash table.
Definition
strptrmap.c:38
te_expr
Definition
tinyexpr.h:39
Generated on
for Legofit by
1.14.0