version 1.111, 2006/01/25 20:38:18
|
version 1.114, 2006/02/26 12:57:58
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
Revision 1.114 2006/02/26 12:57:58 brouard |
|
(Module): Some improvements in processing parameter |
|
filename with strsep. |
|
|
|
Revision 1.113 2006/02/24 14:20:24 brouard |
|
(Module): Memory leaks checks with valgrind and: |
|
datafile was not closed, some imatrix were not freed and on matrix |
|
allocation too. |
|
|
|
Revision 1.112 2006/01/30 09:55:26 brouard |
|
(Module): Back to gnuplot.exe instead of wgnuplot.exe |
|
|
Revision 1.111 2006/01/25 20:38:18 brouard |
Revision 1.111 2006/01/25 20:38:18 brouard |
(Module): Lots of cleaning and bugs added (Gompertz) |
(Module): Lots of cleaning and bugs added (Gompertz) |
(Module): Comments can be added in data file. Missing date values |
(Module): Comments can be added in data file. Missing date values |
Line 3231 To be simple, these graphs help to under
|
Line 3243 To be simple, these graphs help to under
|
} |
} |
free_ma3x(varpij,1,nlstate,1,nlstate+ndeath,(int) bage, (int)fage); |
free_ma3x(varpij,1,nlstate,1,nlstate+ndeath,(int) bage, (int)fage); |
free_matrix(mu,1,(nlstate+ndeath)*(nlstate+ndeath),(int) bage, (int)fage); |
free_matrix(mu,1,(nlstate+ndeath)*(nlstate+ndeath),(int) bage, (int)fage); |
|
free_matrix(doldm,1,(nlstate)*(nlstate+ndeath),1,(nlstate)*(nlstate+ndeath)); |
|
free_matrix(dnewm,1,(nlstate)*(nlstate+ndeath),1,npar); |
free_vector(xp,1,npar); |
free_vector(xp,1,npar); |
fclose(ficresprob); |
fclose(ficresprob); |
fclose(ficresprobcov); |
fclose(ficresprobcov); |
Line 4131 int main(int argc, char *argv[])
|
Line 4145 int main(int argc, char *argv[])
|
char line[MAXLINE], linepar[MAXLINE]; |
char line[MAXLINE], linepar[MAXLINE]; |
char path[MAXLINE],pathc[MAXLINE],pathcd[MAXLINE],pathtot[MAXLINE],model[MAXLINE]; |
char path[MAXLINE],pathc[MAXLINE],pathcd[MAXLINE],pathtot[MAXLINE],model[MAXLINE]; |
char pathr[MAXLINE], pathimach[MAXLINE]; |
char pathr[MAXLINE], pathimach[MAXLINE]; |
|
char **bp, *tok, *val; /* pathtot */ |
int firstobs=1, lastobs=10; |
int firstobs=1, lastobs=10; |
int sdeb, sfin; /* Status at beginning and end */ |
int sdeb, sfin; /* Status at beginning and end */ |
int c, h , cpt,l; |
int c, h , cpt,l; |
Line 4208 int main(int argc, char *argv[])
|
Line 4223 int main(int argc, char *argv[])
|
printf("\n%s\n%s",version,fullversion); |
printf("\n%s\n%s",version,fullversion); |
if(argc <=1){ |
if(argc <=1){ |
printf("\nEnter the parameter file name: "); |
printf("\nEnter the parameter file name: "); |
scanf("%s",pathtot); |
fgets(pathr,FILENAMELENGTH,stdin); |
|
i=strlen(pathr); |
|
if(pathr[i-1]=='\n') |
|
pathr[i-1]='\0'; |
|
for (tok = pathr; tok != NULL; ){ |
|
printf("Pathr |%s|\n",pathr); |
|
while ((val = strsep(&tok, "\"" )) != NULL && *val == '\0'); |
|
printf("val= |%s| pathr=%s\n",val,pathr); |
|
strcpy (pathtot, val); |
|
if(pathr[0] == '\0') break; /* Un peu sale */ |
|
} |
} |
} |
else{ |
else{ |
strcpy(pathtot,argv[1]); |
strcpy(pathtot,argv[1]); |
Line 4625 int main(int argc, char *argv[])
|
Line 4650 int main(int argc, char *argv[])
|
|
|
i=i+1; |
i=i+1; |
} /* End loop reading data */ |
} /* End loop reading data */ |
|
fclose(fic); |
/* printf("ii=%d", ij); |
/* printf("ii=%d", ij); |
scanf("%d",i);*/ |
scanf("%d",i);*/ |
imx=i-1; /* Number of individuals */ |
imx=i-1; /* Number of individuals */ |
Line 4722 int main(int argc, char *argv[])
|
Line 4748 int main(int argc, char *argv[])
|
printf("cptcovprod=%d ", cptcovprod); |
printf("cptcovprod=%d ", cptcovprod); |
fprintf(ficlog,"cptcovprod=%d ", cptcovprod); |
fprintf(ficlog,"cptcovprod=%d ", cptcovprod); |
|
|
scanf("%d ",i); |
scanf("%d ",i);*/ |
fclose(fic);*/ |
|
|
|
/* if(mle==1){*/ |
/* if(mle==1){*/ |
if (weightopt != 1) { /* Maximisation without weights*/ |
if (weightopt != 1) { /* Maximisation without weights*/ |
Line 5607 Interval (in months) between two waves:
|
Line 5632 Interval (in months) between two waves:
|
free_ma3x(probs,1,AGESUP,1,NCOVMAX, 1,NCOVMAX); |
free_ma3x(probs,1,AGESUP,1,NCOVMAX, 1,NCOVMAX); |
|
|
} /* mle==-3 arrives here for freeing */ |
} /* mle==-3 arrives here for freeing */ |
|
free_matrix(prlim,1,nlstate,1,nlstate); |
free_matrix(pmmij,1,nlstate+ndeath,1,nlstate+ndeath); |
free_matrix(pmmij,1,nlstate+ndeath,1,nlstate+ndeath); |
free_matrix(oldms, 1,nlstate+ndeath,1,nlstate+ndeath); |
free_matrix(oldms, 1,nlstate+ndeath,1,nlstate+ndeath); |
free_matrix(newms, 1,nlstate+ndeath,1,nlstate+ndeath); |
free_matrix(newms, 1,nlstate+ndeath,1,nlstate+ndeath); |
free_matrix(savms, 1,nlstate+ndeath,1,nlstate+ndeath); |
free_matrix(savms, 1,nlstate+ndeath,1,nlstate+ndeath); |
|
|
free_matrix(covar,0,NCOVMAX,1,n); |
free_matrix(covar,0,NCOVMAX,1,n); |
free_matrix(matcov,1,npar,1,npar); |
free_matrix(matcov,1,npar,1,npar); |
/*free_vector(delti,1,npar);*/ |
/*free_vector(delti,1,npar);*/ |
Line 5626 Interval (in months) between two waves:
|
Line 5651 Interval (in months) between two waves:
|
free_ivector(Tage,1,15); |
free_ivector(Tage,1,15); |
free_ivector(Tcode,1,100); |
free_ivector(Tcode,1,100); |
|
|
|
free_imatrix(nbcode,0,NCOVMAX,0,NCOVMAX); |
|
free_imatrix(codtab,1,100,1,10); |
fflush(fichtm); |
fflush(fichtm); |
fflush(ficgp); |
fflush(ficgp); |
|
|
Line 5664 Interval (in months) between two waves:
|
Line 5690 Interval (in months) between two waves:
|
/*strcat(plotcmd,CHARSEPARATOR);*/ |
/*strcat(plotcmd,CHARSEPARATOR);*/ |
sprintf(plotcmd,"gnuplot"); |
sprintf(plotcmd,"gnuplot"); |
#ifndef UNIX |
#ifndef UNIX |
sprintf(plotcmd,"\"%swgnuplot.exe\"",pathimach); |
sprintf(plotcmd,"\"%sgnuplot.exe\"",pathimach); |
#endif |
#endif |
if(!stat(plotcmd,&info)){ |
if(!stat(plotcmd,&info)){ |
printf("Error gnuplot program not found: %s\n",plotcmd);fflush(stdout); |
printf("Error gnuplot program not found: %s\n",plotcmd);fflush(stdout); |