
/*
 * Copyright (1987) Jeff Elman.  University of California, San Diego
 * This software may be redistributed without charge; this notice
 * should be preserved.
 */

#define TEST	0
#define	LEARN	1
#define DEFRATE	0.2
#define DEFMOM	0.9
#define	LINEAR 0
#define NONLINEAR 1
#define	DEFWIDTH 25
#define	DEFHEIGHT 25
#define FLUSHCNT 200
#define NCTXTUNITS 100
#define	MAXNODES	1000
#define MAXPLOT2 20
#define GRPHCMD "/usr/local/xlearn"
#define DISPOUT 0
#define	DISPHID 1

/*
 * gross.  All because ibm doesn't have #if
 */
#ifdef ims
#define	EXP(m)	exp(m)
#endif

#ifdef ibmpc
#define	EXP(m)	exp(m)
#endif

#ifdef sun
#define EXP(m) 	(exp_array[((long)((m) * exp_mult)) + exp_add])
#endif

#ifdef vax
#define EXP(m) 	(exp_array[((long)((m) * exp_mult)) + exp_add])
#endif

struct link {
	short	from;
	short	to;
};

struct constraint {
	int	num;
	struct 	link up[50];
	struct 	link down[50];
	float	ss;
};
		
struct cmd {
	char	*name;
	int	(*cmd)();
	int	how;
};

#ifdef ims
#ifdef FILE
extern	FILE *stderr;
extern	FILE *stdin;
extern	FILE *stdout;
#endif
#endif
