1 | #include <stdio.h> |
---|
2 | #include <stdlib.h> |
---|
3 | #include <ctype.h> |
---|
4 | #include <string.h> |
---|
5 | #include <math.h> |
---|
6 | #include <limits.h> |
---|
7 | #include <float.h> |
---|
8 | #include <time.h> |
---|
9 | #include <stdarg.h> |
---|
10 | #include "mb.h" |
---|
11 | |
---|
12 | |
---|
13 | /**************** typedefs used by Fredrik's code, derived from BEST code *******************/ |
---|
14 | |
---|
15 | /* struct for constraints (similar to Distance in BEST code, except |
---|
16 | that a bitfield is used to hold info on the taxon pair) */ |
---|
17 | typedef struct { |
---|
18 | double depth; |
---|
19 | SafeLong* pairSet; |
---|
20 | } Depth; |
---|
21 | |
---|
22 | |
---|
23 | /**************** Declaration of functions that are called from MrBayes **************/ |
---|
24 | void AllocateBestChainVariables(void); |
---|
25 | int FillSpeciesTreeParams (SafeLong* seed, int from, int to); |
---|
26 | void FreeBestChainVariables(void); |
---|
27 | int IsSpeciesTreeConsistent (Tree *speciesTree, int chain); |
---|
28 | double LnSpeciesTreeProb(int chain); |
---|
29 | double LnJointGeneTreeSpeciesTreePr(Tree **geneTrees, int numGeneTrees, Tree *speciesTree, int chain); |
---|
30 | int Move_GeneTree1 (Param *param, int chain, SafeLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); |
---|
31 | int Move_GeneTree2 (Param *param, int chain, SafeLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); |
---|
32 | int Move_GeneTree3 (Param *param, int chain, SafeLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); |
---|
33 | int Move_NodeSliderGeneTree (Param *param, int chain, SafeLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); |
---|
34 | int Move_SpeciesTree (Param *param, int chain, SafeLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); |
---|
35 | void ShowUpperTriangMatrix(double *values, int squareSize); |
---|
36 | |
---|
37 | /* NOTE: To add and set up more move functions, a struct needs to be added to SetUpMoveTypes in model.c */ |
---|