Legofit
infers population history from nucleotide site patterns.
cost.h
1#ifndef LEGO_COST
2#define LEGO_COST
3
4#include "typedefs.h"
5
6struct ThreadData {
7 unsigned seed;
8};
9
11typedef struct CostPar {
12 BranchTab *obs; // observed site pattern frequencies; normalized
13 void *network; // model of population history
14 int nThreads; // number of threads to use
15 int doSing; // nonzero => use singleton site patterns
16 double min_brlen; // minimum branch length per site pattern
17 SimSched *simSched;
18} CostPar;
19
20double costFun(int dim, double x[dim], void *jdata, void *tdata);
21void *CostPar_dup(const void * arg);
22void CostPar_free(void *arg);
23
24#endif
double costFun(int dim, double x[dim], void *jdata, void *tdata)
Calculate cost.
Definition: cost.c:36
void CostPar_free(void *arg)
CostPar destructor.
Definition: cost.c:82
void * CostPar_dup(const void *arg)
Duplicate an object of class CostPar.
Definition: cost.c:65
Definition: branchtab.c:20
Parameters of cost function–that which is minimized.
Definition: cost.h:11
Holds a linked list of Stages and a mutex lock.
Definition: simsched.c:37
Definition: cost.h:6