Diff for /imach/src/imach.c between versions 1.54 and 1.57

version 1.54, 2002/07/24 09:07:45 version 1.57, 2002/07/25 07:37:44
Line 60 Line 60
 /*#define GNUPLOTPROGRAM "..\\gp37mgw\\wgnuplot"*/  /*#define GNUPLOTPROGRAM "..\\gp37mgw\\wgnuplot"*/
 #define FILENAMELENGTH 80  #define FILENAMELENGTH 80
 /*#define DEBUG*/  /*#define DEBUG*/
 #define unix  #define windows
 #define GLOCK_ERROR_NOPATH              -1      /* empty path */  #define GLOCK_ERROR_NOPATH              -1      /* empty path */
 #define GLOCK_ERROR_GETCWD              -2      /* cannot get cwd */  #define GLOCK_ERROR_GETCWD              -2      /* cannot get cwd */
   
Line 163  int estepm; Line 163  int estepm;
 int m,nb;  int m,nb;
 int *num, firstpass=0, lastpass=4,*cod, *ncodemax, *Tage;  int *num, firstpass=0, lastpass=4,*cod, *ncodemax, *Tage;
 double **agev,*moisnais, *annais, *moisdc, *andc,**mint, **anint;  double **agev,*moisnais, *annais, *moisdc, *andc,**mint, **anint;
 double **pmmij, ***probs, ***mobaverage;  double **pmmij, ***probs;
 double dateintmean=0;  double dateintmean=0;
   
 double *weight;  double *weight;
Line 1819  void varevsij(char optionfilefiname[], d Line 1819  void varevsij(char optionfilefiname[], d
   double ***mobaverage;    double ***mobaverage;
   int theta;    int theta;
   char digit[4];    char digit[4];
   char digitp[16];    char digitp[25];
   
   char fileresprobmorprev[FILENAMELENGTH];    char fileresprobmorprev[FILENAMELENGTH];
   
   if(popbased==1)    if(popbased==1){
     strcpy(digitp,"-populbased-");      if(mobilav==1)
   else        strcpy(digitp,"-populbased-mobilav-");
       else strcpy(digitp,"-populbased-nomobil-");
     }
     else 
     strcpy(digitp,"-stablbased-");      strcpy(digitp,"-stablbased-");
   if(mobilav!=0)  
     strcat(digitp,"mobilav-");  
   else  
     strcat(digitp,"nomobil-");  
   if (mobilav!=0) {    if (mobilav!=0) {
     mobaverage= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX);      mobaverage= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX);
     if (movingaverage(probs, bage, fage, mobaverage,mobilav)!=0){      if (movingaverage(probs, bage, fage, mobaverage,mobilav)!=0){
Line 2087  void varevsij(char optionfilefiname[], d Line 2087  void varevsij(char optionfilefiname[], d
   free_matrix(doldmp,nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath);    free_matrix(doldmp,nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath);
   free_matrix(dnewmp,nlstate+1,nlstate+ndeath,1,npar);    free_matrix(dnewmp,nlstate+1,nlstate+ndeath,1,npar);
   free_matrix(varppt,nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath);    free_matrix(varppt,nlstate+1,nlstate+ndeath,nlstate+1,nlstate+ndeath);
   free_ma3x(mobaverage,1, AGESUP,1,NCOVMAX, 1,NCOVMAX);    if (mobilav!=0) free_ma3x(mobaverage,1, AGESUP,1,NCOVMAX, 1,NCOVMAX);
   fclose(ficresprobmorprev);    fclose(ficresprobmorprev);
   fclose(ficgp);    fclose(ficgp);
   fclose(fichtm);    fclose(fichtm);
   
 }  }
   
 /************ Variance of prevlim ******************/  /************ Variance of prevlim ******************/
Line 2814  prevforecast(char fileres[], double anpr Line 2813  prevforecast(char fileres[], double anpr
   double calagedate, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean;    double calagedate, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean;
   double *popeffectif,*popcount;    double *popeffectif,*popcount;
   double ***p3mat;    double ***p3mat;
     double ***mobaverage;
   char fileresf[FILENAMELENGTH];    char fileresf[FILENAMELENGTH];
   
  agelim=AGESUP;   agelim=AGESUP;
Line 2921  populforecast(char fileres[], double anp Line 2921  populforecast(char fileres[], double anp
   double calagedate, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean;    double calagedate, agelim, kk1, kk2, yp,yp1,yp2,jprojmean,mprojmean,anprojmean;
   double *popeffectif,*popcount;    double *popeffectif,*popcount;
   double ***p3mat,***tabpop,***tabpopprev;    double ***p3mat,***tabpop,***tabpopprev;
     double ***mobaverage;
   char filerespop[FILENAMELENGTH];    char filerespop[FILENAMELENGTH];
   
   tabpop= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX);    tabpop= ma3x(1, AGESUP,1,NCOVMAX, 1,NCOVMAX);
Line 3725  printf("Total number of individuals= %d, Line 3726  printf("Total number of individuals= %d,
    ungetc(c,ficpar);     ungetc(c,ficpar);
       
    fscanf(ficpar,"begin-prev-date=%lf/%lf/%lf end-prev-date=%lf/%lf/%lf mov_average=%d\n",&jprev1, &mprev1,&anprev1,&jprev2, &mprev2,&anprev2,&mobilav);     fscanf(ficpar,"begin-prev-date=%lf/%lf/%lf end-prev-date=%lf/%lf/%lf mov_average=%d\n",&jprev1, &mprev1,&anprev1,&jprev2, &mprev2,&anprev2,&mobilav);
    fprintf(ficparo,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,&mobilav);     fprintf(ficparo,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);
    fprintf(ficres,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,&mobilav);     fprintf(ficres,"begin-prev-date=%.lf/%.lf/%.lf end-prev-date=%.lf/%.lf/%.lf mov_average=%d\n",jprev1, mprev1,anprev1,jprev2, mprev2,anprev2,mobilav);
         
    while((c=getc(ficpar))=='#' && c!= EOF){     while((c=getc(ficpar))=='#' && c!= EOF){
      ungetc(c,ficpar);       ungetc(c,ficpar);

Removed from v.1.54  
changed lines
  Added in v.1.57


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>