1 | /* |
---|
2 | |
---|
3 | PHYML : a program that computes maximum likelihood phylogenies from |
---|
4 | DNA or AA homologous sequences |
---|
5 | |
---|
6 | Copyright (C) Stephane Guindon. Oct 2003 onward |
---|
7 | |
---|
8 | All parts of the source except where indicated are distributed under |
---|
9 | the GNU public licence. See http://www.opensource.org for details. |
---|
10 | |
---|
11 | */ |
---|
12 | |
---|
13 | #ifndef OPTIMIZ_H |
---|
14 | #define OPTIMIZ_H |
---|
15 | |
---|
16 | void Optimiz_Ext_Br(arbre *tree); |
---|
17 | void Optimize_Alpha(arbre *tree); |
---|
18 | void Optimize_Kappa(arbre *tree); |
---|
19 | void Optimize_Lambda(arbre *tree); |
---|
20 | void Optimize_Param_Parall(arbre *tree); |
---|
21 | double Br_Len_NR(arbre *tree,allseq *alldata,edge *b_fcus, int n_passes); |
---|
22 | double Optimize_Branch_Quad(arbre *tree, allseq *alldata, edge *b_fcus); |
---|
23 | void Optimize_After_Hide(arbre *tree, allseq *alldata, node *h); |
---|
24 | void Round_Optimize(arbre *tree, allseq *data); |
---|
25 | void Print_Lk_Progress(arbre *tree, double lk_new, double lk_old, int n_iter); |
---|
26 | int Dist_Seq_Brak(double *ax, double *bx, double *cx, |
---|
27 | double *fa, double *fb, double *fc, |
---|
28 | allseq *data, int num1, int num2, model *mod); |
---|
29 | double Dist_Seq_Brent(double ax, double bx, double cx, double tol, |
---|
30 | double *xmin, allseq *data, |
---|
31 | int num1, int num2, model *mod); |
---|
32 | double Optimize_One_Dist(allseq *data, int numseq1, int numseq2, |
---|
33 | double init_dist, model *mod); |
---|
34 | double Kappa_Golden(double ax, double bx, double cx, double tol, |
---|
35 | double *xmin, arbre *tree, allseq *alldata); |
---|
36 | double Lambda_Golden(double ax, double bx, double cx, double tol, |
---|
37 | double *xmin, arbre *tree, allseq *alldata); |
---|
38 | double Alpha_Golden_Br_Opt(double ax, double bx, double cx, double tol, |
---|
39 | double *xmin, arbre *tree, allseq *alldata, |
---|
40 | int n_opt, double *init_l); |
---|
41 | double Alpha_Golden(double ax, double bx, double cx, double tol,double *xmin, |
---|
42 | arbre *tree, allseq *alldata); |
---|
43 | double Br_Len_Golden(double ax, double bx, double cx, double tol, |
---|
44 | double *xmin, edge *b_fcus, arbre *tree); |
---|
45 | double Br_Len_Brent(double ax, double bx, double cx, double tol, |
---|
46 | double *xmin, edge *b_fcus, arbre *tree, int n_iter_max); |
---|
47 | int Br_Len_Brak(double *ax, double *bx, double *cx, |
---|
48 | double *fa, double *fb, double *fc, |
---|
49 | edge *b_fcus, arbre *tree); |
---|
50 | double Optimize_Path_Length(model *mod, allseq *alldata, edge *a, |
---|
51 | int lra, edge *b, int lrb, double i_len); |
---|
52 | void Optimize_Param_Serie(node *a, node *d, edge *b_fcus, arbre *tree, |
---|
53 | allseq *alldata, int n_passes); |
---|
54 | double Optimize_Dist(model *mod, double init, allseq *twoseqs); |
---|
55 | double Pinvar_Golden(double ax, double bx, double cx, double tol, |
---|
56 | double *xmin, arbre *tree, allseq *alldata, int n_iter_max); |
---|
57 | void Optimize_Pinvar(arbre *tree); |
---|
58 | int Lambda_Brak(double *ax, double *bx, double *cx, |
---|
59 | double *fa, double *fb, double *fc, |
---|
60 | arbre *tree); |
---|
61 | int Kappa_Brak(double *ax, double *bx, double *cx, |
---|
62 | double *fa, double *fb, double *fc, |
---|
63 | arbre *tree); |
---|
64 | int Alpha_Brak(double *ax, double *bx, double *cx, |
---|
65 | double *fa, double *fb, double *fc, |
---|
66 | arbre *tree); |
---|
67 | int Pinvar_Brak(double *ax, double *bx, double *cx, |
---|
68 | double *fa, double *fb, double *fc, |
---|
69 | arbre *tree); |
---|
70 | void Optimiz_All_Free_Param(arbre *tree, int verbose); |
---|
71 | void Optimiz_RRparam_GTR(arbre *tree, int num_param); |
---|
72 | double RRparam_GTR_Golden(double ax, double bx, double cx, double tol, |
---|
73 | double *xmin, arbre *tree, allseq *alldata, double *param, int n_iter_max); |
---|
74 | |
---|
75 | int Powell_GTR_Param(arbre *tree, double *p, int n, double ftol); |
---|
76 | double Linmin_GTR_Param(arbre *tree,double *p, double *xi, int n); |
---|
77 | double F1dim(arbre *tree, double x, double *p, double *xi, double n); |
---|
78 | int Mnbrak_1dim(double *ax, double *bx, double *cx, |
---|
79 | double *fa, double *fb, double *fc, |
---|
80 | arbre *tree, |
---|
81 | double *p, double *xi, double n); |
---|
82 | double Brent_1dim(double ax, double bx, double cx, |
---|
83 | double tol, double *xmin, |
---|
84 | arbre *tree, |
---|
85 | double *p, double *xi, double n); |
---|
86 | |
---|
87 | int Min_With_Derivatives(arbre *tree, double *p, int n, double ftol, double step_size, |
---|
88 | double (*func) (), void (*dfunc)(), double (*linmin)()); |
---|
89 | void BFGS(arbre *tree, double *p, int n, double gtol, double step_size, |
---|
90 | double(*func)(), void (*dfunc)(), void (*lnsrch)(),int *failed); |
---|
91 | void Lnsrch_RR_Param(arbre *tree, int n, double *xold, double fold, double *g, double *p, double *x, |
---|
92 | double *f, double stpmax, int *check); |
---|
93 | void Optimize_Single_Param_Generic(arbre *tree, double *param, |
---|
94 | double start, |
---|
95 | double lim_inf, double lim_sup, |
---|
96 | int n_max_iter); |
---|
97 | int Generic_Brak(double *param, |
---|
98 | double *ax, double *bx, double *cx, |
---|
99 | double *fa, double *fb, double *fc, |
---|
100 | double lim_inf, double lim_sup, |
---|
101 | arbre *tree); |
---|
102 | double Generic_Brent(double *param, |
---|
103 | double ax, double bx, double cx, double tol, |
---|
104 | double *xmin, arbre *tree, int n_iter_max); |
---|
105 | void Optimize_Br_Len_Serie(node *a, node *d, edge *b_fcus, |
---|
106 | arbre *tree,allseq *alldata, int n_passes); |
---|
107 | void Lnsrch_Nucleotide_Frequencies(arbre *tree, int n, double *xold, |
---|
108 | double fold, double *g, double *p, double *x, |
---|
109 | double *f, double stpmax, int *check); |
---|
110 | |
---|
111 | void Optimize_Global_Rate(arbre *tree); |
---|
112 | |
---|
113 | |
---|
114 | |
---|
115 | #endif |
---|
116 | |
---|