#ifndef _MY_LOCAL_H #define _MY_LOCAL_H /** time() for srand()-init */ #include /** fopen and Co. */ #include /** printf and Co. */ #include /** error number */ #include /** strerror(), strcmp(), strcat() etc. */ #include /** sqrt() */ #include /** set assertions, "gcc -DNDEBUG" disables assertions */ #include #include "local_ann.h" /** test if a float/double is a NaN-value (not a number) */ #define ISNAN(a) (((a)!=(a))) /* a NaN value compared with itself will be failed ever */ /** TRUE definition that way to be portable */ #define TRUE (1==1) /** FALSE definition that way to be portable */ #define FALSE (1==0) /** The Output must be scaled from original range to range -1 .. 1 by factor, * the Input should be scaled too to ensure sum/bias does not exceed the range */ #define SCALE 0.0001 /** this defines return-values if the programs will be failed, useful only if scripting is needed */ enum err{ /** all okay */ ERROK=0, /** the cmdline argument is wrong or unexpected */ ERRARG, /** there were errors in parsing streams/files */ ERRSTREAM, /** error in memory allocation */ ERRMEM, /** unexpected error in program code */ ERRPRGCODE, /** error in libfann */ ERRFANN, }; /* prototypes */ /* shared/mrandomize.c */ unsigned int mrandomize(unsigned int max); struct s_net readin_csv(struct s_net net); #endif