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 Optimize_Branch_Quad(arbre *tree, allseq *alldata, edge *b_fcus); |
---|
22 | void Optimize_After_Hide(arbre *tree, allseq *alldata, node *h); |
---|
23 | void Round_Optimize(arbre *tree, allseq *data); |
---|
24 | int Dist_Seq_Brak(double *ax, double *bx, double *cx, |
---|
25 | double *fa, double *fb, double *fc, |
---|
26 | allseq *data, int num1, int num2, model *mod); |
---|
27 | double Dist_Seq_Brent(double ax, double bx, double cx, double tol, |
---|
28 | double *xmin, allseq *data, |
---|
29 | int num1, int num2, model *mod); |
---|
30 | double Optimize_One_Dist(allseq *data, int numseq1, int numseq2, |
---|
31 | double init_dist, model *mod); |
---|
32 | double Kappa_Golden(double ax, double bx, double cx, double tol, |
---|
33 | double *xmin, arbre *tree, allseq *alldata); |
---|
34 | double Lambda_Golden(double ax, double bx, double cx, double tol, |
---|
35 | double *xmin, arbre *tree, allseq *alldata); |
---|
36 | double Alpha_Golden_Br_Opt(double ax, double bx, double cx, double tol, |
---|
37 | double *xmin, arbre *tree, allseq *alldata, |
---|
38 | int n_opt, double *init_l); |
---|
39 | double Alpha_Golden(double ax, double bx, double cx, double tol,double *xmin, |
---|
40 | arbre *tree, allseq *alldata); |
---|
41 | double Br_Len_Golden(double ax, double bx, double cx, double tol, |
---|
42 | double *xmin, edge *b_fcus, arbre *tree); |
---|
43 | double Br_Len_Brent(double ax, double bx, double cx, double tol, |
---|
44 | double *xmin, edge *b_fcus, arbre *tree, int n_iter_max); |
---|
45 | int Br_Len_Brak(double *ax, double *bx, double *cx, |
---|
46 | double *fa, double *fb, double *fc, |
---|
47 | edge *b_fcus, arbre *tree); |
---|
48 | double Optimize_Path_Length(model *mod, allseq *alldata, edge *a, |
---|
49 | int lra, edge *b, int lrb, double i_len); |
---|
50 | void Optimize_Param_Serie(node *a, node *d, edge *b_fcus, arbre *tree, |
---|
51 | allseq *alldata, int n_passes); |
---|
52 | double Optimize_Dist(model *mod, double init, allseq *twoseqs); |
---|
53 | double Pinvar_Golden(double ax, double bx, double cx, double tol, |
---|
54 | double *xmin, arbre *tree, allseq *alldata, int n_iter_max); |
---|
55 | void Optimize_Pinvar(arbre *tree); |
---|
56 | int Lambda_Brak(double *ax, double *bx, double *cx, |
---|
57 | double *fa, double *fb, double *fc, |
---|
58 | arbre *tree); |
---|
59 | int Kappa_Brak(double *ax, double *bx, double *cx, |
---|
60 | double *fa, double *fb, double *fc, |
---|
61 | arbre *tree); |
---|
62 | int Alpha_Brak(double *ax, double *bx, double *cx, |
---|
63 | double *fa, double *fb, double *fc, |
---|
64 | arbre *tree); |
---|
65 | int Pinvar_Brak(double *ax, double *bx, double *cx, |
---|
66 | double *fa, double *fb, double *fc, |
---|
67 | arbre *tree); |
---|
68 | void Optimiz_All_Free_Param(arbre *tree, int verbose); |
---|
69 | void Optimiz_RRparam_GTR(arbre *tree, int num_param); |
---|
70 | double RRparam_GTR_Golden(double ax, double bx, double cx, double tol, |
---|
71 | double *xmin, arbre *tree, allseq *alldata, double *param, int n_iter_max); |
---|
72 | |
---|
73 | int Powell_GTR_Param(arbre *tree, double *p, int n, double ftol); |
---|
74 | double Linmin_GTR_Param(arbre *tree,double *p, double *xi, int n); |
---|
75 | double F1dim(arbre *tree, double x, double *p, double *xi, double n); |
---|
76 | int Mnbrak_1dim(double *ax, double *bx, double *cx, |
---|
77 | double *fa, double *fb, double *fc, |
---|
78 | arbre *tree, |
---|
79 | double *p, double *xi, double n); |
---|
80 | double Brent_1dim(double ax, double bx, double cx, |
---|
81 | double tol, double *xmin, |
---|
82 | arbre *tree, |
---|
83 | double *p, double *xi, double n); |
---|
84 | |
---|
85 | int Min_With_Derivatives(arbre *tree, double *p, int n, double ftol, double step_size, |
---|
86 | double (*func) (), void (*dfunc)(), double (*linmin)()); |
---|
87 | void BFGS(arbre *tree, double *p, int n, double gtol, double step_size, |
---|
88 | double(*func)(), void (*dfunc)(), void (*lnsrch)(),int *failed); |
---|
89 | void Lnsrch_RR_Param(arbre *tree, int n, double *xold, double fold, double *g, double *p, double *x, |
---|
90 | double *f, double stpmax, int *check); |
---|
91 | void Optimize_Single_Param_Generic(arbre *tree, double *param, |
---|
92 | double start, |
---|
93 | double lim_inf, double lim_sup, |
---|
94 | int n_max_iter); |
---|
95 | int Generic_Brak(double *param, |
---|
96 | double *ax, double *bx, double *cx, |
---|
97 | double *fa, double *fb, double *fc, |
---|
98 | double lim_inf, double lim_sup, |
---|
99 | arbre *tree); |
---|
100 | double Generic_Brent(double *param, |
---|
101 | double ax, double bx, double cx, double tol, |
---|
102 | double *xmin, arbre *tree, int n_iter_max); |
---|
103 | void Optimize_Br_Len_Serie(node *a, node *d, edge *b_fcus, |
---|
104 | arbre *tree,allseq *alldata, int n_passes); |
---|
105 | void Lnsrch_Nucleotide_Frequencies(arbre *tree, int n, double *xold, |
---|
106 | double fold, double *g, double *p, double *x, |
---|
107 | double *f, double stpmax, int *check); |
---|
108 | |
---|
109 | void Optimize_Global_Rate(arbre *tree); |
---|
110 | |
---|
111 | |
---|
112 | |
---|
113 | #endif |
---|
114 | |
---|