//trainer.cpp 1/11/1999 //(c) Oguz Yetkin, 1999 #include /* for rand */ #include #include #include #include #include #include //because I can... #include "array2d.h" #include "neural.h" int lyap=1; //calculate lyapunov exponent //the following globals are from neural.cpp //extern long Gimprovements; //extern long Gsteps; //extern double Gerror; //extern double Gle; //extern long Gleiters; //iterations for lyapunov calculation //extern double Gmisses; extern double Gconstraint; //extern double Gcalculate_lyapunov; //extern double Gtemperature; extern double Glower; //lower LE constraint extern double Gupper; //upper LE constraint int main(int argc, char** argv){ //see random number generator with the time srand( (unsigned)time( NULL ) ); char* trainfile; char* netfile; char* outfile; long n; long m; long tlen; long steps; long goal_improvements; long run_freq; long run_len; double s; double err=10; trainfile=new char[100]; netfile=new char[100]; outfile=new char[100]; //cout<<"\ntest"<=10){ strcpy(trainfile,argv[1]); strcpy(netfile,argv[2]); strcpy(outfile,argv[3]); n=strtol(argv[4], NULL, 10); m=strtol(argv[5],NULL,10); s=strtod(argv[6], NULL); goal_improvements=strtol(argv[7], NULL, 10); run_freq=strtol(argv[8], NULL, 10); run_len=strtol(argv[9], NULL, 10); if(argc==11){ //constraint variable Gconstraint=strtol(argv[10], NULL, 10); } if(argc==12){ Glower=strtod(argv[10],NULL); Gupper=strtod(argv[11],NULL); cout<<"\nGlower: "<