next up previous contents
Next: funcdef.h Up: ����ե����� Previous: ����ե�����

grobal.h

{

/* **** �ѹ���ʬ ************************************* */

/* ���ǻҿ������ */
/* ���տ��椢�� */
#define  Tunit    2     /* ����Ĺ�����⤵��Ϳ�������� */
#define  Lunit    0     /* ���β���Ϳ��������(�������Ѱ�) */
#define  Cunit    0     /* ��������ͤ�Ϳ�������� */

/* ���տ���ʤ� */
#define  Nunit    23    /* ���������� */
#define  Eunit    0     /* ʸ̮�� */

#define  Filenumber 11  /* �ե������ֹ� */

#define  Inunit   ( Tunit + Lunit + Cunit + Nunit + Eunit )  /* ������ */
#define  Midunit  15                                         /* ����� */
#define  Outunit  ( Tunit + Lunit + Cunit + Nunit + Eunit )  /* ������ */

/* ���̥ե饰 */
int  Quant = 0;       /* �̻Ҳ����뤫 ( 0 : ���ʤ� <> ����ʳ� : ���� ) */
int  Flag_zero = 0;   /* �ؽ� : ��첻�ܤ��Ф������������ؤ�0�ˤ��뤫 
                         �۵� : ������������ʬ��0��������۵����뤫   */

int  Flag_Elman = 0;  /* ʸ̮�ؤ��Ѥ������Υե饰 */
int  Flag_NNaibu = 0; /* ���������ؤ����������ؤ��Ѥ������Υե饰 */

#ifdef STUDY

/* �ؽ��Υե饰 */
int  Flag_noize = 0;        /* �ؽ��������Ϥ˥Υ�����Ϳ���� */
int  Flag_gosaplotnew = 0;  /* ����������礭����¬�ꤹ�� */
int  Flag_backpro = 3;      /* �Хå��ץ��ѥ����������٤���(default = 3) */

/* �����Τ���Υե饰 */
int  Flag_continue = 1;  /* �ؽ���³���뤫�ɤ����Υե饰 */
int  Flag_success = 0;   /* �ؽ��������������Υե饰 */

#endif

#ifdef RECALL

/* �۵��Υե饰 */
int  Flag_random = 0;        /* ����������ʬ�˥�������ͤ�������۵� */
int  Flag_inc = 0;         /* ����Ĺ�����⤵�˥Υ���������� */
int  Flag_inout = 0;         /* ����������ʬ������0���Ĥ���1.0������򤹤� */
int  Flag_teachcut = 0;      /* ����Ĺ�����⤵��ʬ�����줺���۵� */
int  Flag_view = 1;          /* ���Ϸ�̤����ɽ������ */
int  Flag_weightplot = 1;    /* ���ٽ� - ���ٽ�������¬�ꤹ�� */
int  Flag_weightsearch = 0;  /* ���ٽŤ��Ѥ�¬�ꤹ�� */
int  Flag_weightplot02 = 1;  /* ������ - ���ٽ�������¬�ꤹ�� */
int  Flag_caos = 0;          /* �������˥塼������Ѥ����۵���Ԥʤ� */

int  Set_zero = 0;  /* ��ʬŪ��0������뤿����ѿ� */
int  Set_inout = 0; /* ��ս����1.0������� */

#endif
/***** �����ޤ� **************************************/

/***** �����ѿ� **************************************/

#define  TL    ( Tunit + Lunit )
#define  TLC   ( Tunit + Lunit + Cunit )
#define  TLCN  ( Tunit + Lunit + Cunit + Nunit )

/* ������θĿ� */
#define  Smax  256
#define  Time  40

/* �̻Ҳ���٥� */
#define  Kaisou ( 10 + 1 )  /* ��٥�� */
#define  Zoubun 0.1         /* 1��٥���� */

#define  Seed  1  /* ����μ� */
#define  Bai   1  /* Eta���ܿ�(����������ʬ�����ؽ��򶯲�������) */

#define  Gakusyu    10000    /* ���ܳؽ���� */
#define  Saidai     1000000  /* ����ؽ���� */
#define  Souki      2000     /* �۵���� */

/* ��������ͤ����ꤹ�� */
#define  Lhigh   1.0  /* ������������� */
#define  Llow    0.0
#define  qrand() ( drand48() * ( Lhigh - Llow ) + Llow )

#define Nhigh       0.05  /* ������ */
#define Nlow        -0.05
#define lenrand()   ( drand48() * ( Nhigh - Nlow ) + Nlow )

#define Hhigh       0.00625  /* ���ι⤵ */
#define Hlow        -0.00625
#define heirand()   ( drand48() * ( Hhigh - Hlow ) + Hlow )

#define fsig( in ) ( 1 / ( 1 + exp( -( in ))) )   /* �����⥤�ɴؿ� */
#define frev( in ) ( log( ( in ) / ( in - 1 ) ) ) /* ����Ĺ���δؿ� */

/* ���ٽ� */
double  wim[Midunit][Inunit];  /* �����ء������ */
double  wmo[Outunit][Midunit]; /* ����ء������� */

/* ���� */
double  sikiiim[Midunit];      /* ������ǻ� */
double  sikiimo[Outunit];      /* �������ǻ� */

/* ���������� */
double  inout[Inunit][Time];   /* �����ؤ����Ϥ���� */
double  midout[Midunit];       /* ����ؤ����Ϥ���� */
double  outout[Outunit];       /* �����ؤ�����Ϥ���� */

int  tsmax;  /* �ºݤλ������Ĺ�� */
int  k;      /* �׻�������ѿ� */
int  kk;     /* �׻�����κ��� */
int  t;      /* ���ߤλ��֤��ѿ� */
int  r;      /* ���ߤη׻�����ι�� */

double  inkeep[Inunit][Time]; /* �ºݤ˶��տ��椬���� */
double  outkeep[Outunit];     /* �����ͤ��ݻ����� */

char  *Data      = "saita";   /* ���տ���ե�����̾ */
char  *fi_weight = NULL;

char    fiplot[Smax];
char    fisong[Smax];
char    finaibu[Smax];
FILE  *fpplot;
FILE  *fpsong;
FILE  *fpnaibu;

/***** �ؽ��˻Ȥ��ѿ� **************************************/
#ifdef STUDY

double  Eta = 0.5;     /* �ؽ����� */
double  Alpha = 0.005; /* ��®�� */
double  Eta2;          /* ����������ʬ��Ϳ������ؽ����� */

/* ���ؽŤߤ��Ѳ�ʬ */
double  dwim[Midunit][Inunit];
double  dwmo[Outunit][Midunit];

/* ���¤����������� */
double  dim[Midunit];
double  dmo[Outunit];

/* �������ͤ��Ѳ�ʬ */
double  dsikiiim[Midunit];
double  dsikiimo[Outunit];

/* ���ٽŤ������Ƿ��� */
#define Rhigh           0.30
#define Rlow            -0.30
#define urand()         ( drand48() * ( Rhigh - Rlow ) + Rlow )

double  midkeep[Midunit];  /* t-1 ������ؤؤ����� */
double  midkeep2[Midunit]; /* t-2 ������ؤؤ����� */
double  midkeep3[Midunit]; /* t-3 ������ؤؤ����� */

double  outkept[Outunit][Time];

double  outkeep2[Outunit];
double  outkeep3[Outunit];

double  gosa[Outunit][Time];
double  kekka[Outunit];

double  cyclekeep[Inunit][Time];
double  noisein[Tunit][Time];
double  gosakeep[Tunit];
double  gosasumcloseteach , gosasumcloseall;
double  gosasumopenteach , gosasumopenall;
double  dmoteach[TLC];
double  dmonaibu[Nunit];
double  dimlate[Midunit] , dimlate2[Midunit]; /* �������� */
double  dimget[Midunit];

int chsuccess,chfault;

FILE    *fi;
FILE    *fprecall;
FILE    *fpin;
FILE    *fpnaibucheck;
FILE    *fpnaibu2,*fpnaibu4;
FILE    *fpout;
FILE    *fpfirst;
FILE    *fpsumplot;
FILE    *fpdimplot;
char    figosa[Smax];
char    firecall[Smax];
char    fiin[Smax];
char    finaibucheck[Smax];
char    finaibu2[Smax],finaibu4[Smax];
char    fiout[Smax];
char    fifirst[Smax];
char    fisumplot[Smax];
char    fidimplot[Smax];

#endif

/****** �۵��˻Ȥ��ѿ� *************************************/
#ifdef RECALL

double  song[Tunit][Time];
double  songkeep[Tunit][Time];
double  Noize;

double  em[Midunit] , old_em[Midunit];
double  zm[Midunit] , old_zm[Midunit];
double  km , kr , al;
double  old_midout[Midunit];

int     over , under;

char  fiweight_tm[Smax];
char  fiweight_nm[Smax];
char  fiweight_mt[Smax];
char  fiweight_mn[Smax];
FILE  *fpweight_tm;
FILE  *fpweight_nm;
FILE  *fpweight_mt;
FILE  *fpweight_mn;

char  fiweight02_tm[Smax];
char  fiweight02_nm[Smax];
char  fiweight02_mt[Smax];
char  fiweight02_mn[Smax];
FILE  *fpweight02_tm;
FILE  *fpweight02_nm;
FILE  *fpweight02_mt;
FILE  *fpweight02_mn;

#endif



Toshinori DEGUCHI
2003ǯ 4��11�� ������ 11��42ʬ54�� JST