=================================================================== RCS file: /home/cvs/OpenXM/src/hgm/mh/src/wmain.c,v retrieving revision 1.22 retrieving revision 1.27 diff -u -p -r1.22 -r1.27 --- OpenXM/src/hgm/mh/src/wmain.c 2015/03/24 05:59:43 1.22 +++ OpenXM/src/hgm/mh/src/wmain.c 2016/02/04 06:56:05 1.27 @@ -1,5 +1,5 @@ /* - $OpenXM: OpenXM/src/hgm/mh/src/wmain.c,v 1.21 2014/03/20 10:58:37 takayama Exp $ + $OpenXM: OpenXM/src/hgm/mh/src/wmain.c,v 1.26 2016/02/01 11:37:14 takayama Exp $ License: LGPL */ #include @@ -14,6 +14,8 @@ int MH_deallocate=0; /* changelog + 2016.02.04 MH_Ef_type exponential or scalar factor + 2016.02.01 C_2F1 2014.03.15 --strategy 1 is default. A new parser in setParam() */ extern char *MH_Gfname; @@ -48,6 +50,20 @@ double MH_coeff_max; Estimation of h by MH_coeff_max; */ double MH_estimated_start_step; + +#ifdef C_2F1 +int MH_P_pFq=2; +int MH_Q_pFq=1; +double MH_A_pFq[2]; +double MH_B_pFq[1]; +int MH_Ef_type=2; +#else +int MH_P_pFq=1; +int MH_Q_pFq=1; +double MH_A_pFq[1]; +double MH_B_pFq[1]; +int MH_Ef_type=1; +#endif extern int MH_Verbose; extern int MH_strategy; extern double MH_abserr; @@ -62,6 +78,9 @@ static int showParam(void); static int next(struct SFILE *fp,char *s, char *msg); static double estimateHg(int m, double beta[],double x0); +#ifdef C_2F1 +void mh_setabc(double a,double b,double c); +#endif /* #define DEBUG */ #ifdef DEBUG char *MH_Dfname; char *MH_Gfname; double MH_Hg; @@ -85,7 +104,7 @@ static int mypower(int x,int n) { return(a); } #ifdef STANDALONE2 -main(int argc,char *argv[]) { +int main(int argc,char *argv[]) { int strategy=STRATEGY_DEFAULT; double err[2]={-1.0,-1.0}; int i; @@ -175,13 +194,21 @@ struct MH_RESULT *mh_main(int argc,char *argv[]) { if (MH_Verbose) showParam(); if (MH_Verbose) {for (i=0; i