00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef NH_cmaes_h
00016 #define NH_cmaes_h
00017
00018 #include <time.h>
00019
00020 typedef
00021 struct
00022
00023
00024
00025 {
00026
00027 long int startseed;
00028 long int aktseed;
00029 long int aktrand;
00030 long int *rgrand;
00031
00032
00033 short flgstored;
00034 double hold;
00035 } random_t;
00036
00037 typedef
00038 struct
00039
00040
00041
00042 {
00043
00044 double totaltime;
00045 double tictoctime;
00046 double lasttictoctime;
00047
00048
00049 clock_t lastclock;
00050 time_t lasttime;
00051 clock_t ticclock;
00052 time_t tictime;
00053 short istic;
00054 short isstarted;
00055
00056 double lastdiff;
00057 double tictoczwischensumme;
00058 } timings_t;
00059
00060 typedef
00061 struct
00062
00063
00064
00065
00066 {
00067
00068 int N;
00069 unsigned int seed;
00070 double * xstart;
00071 double * typicalX;
00072 int typicalXcase;
00073 double * rgInitialStds;
00074 double * rgDiffMinChange;
00075
00076
00077 double stopMaxFunEvals;
00078 double facmaxeval;
00079 double stopMaxIter;
00080 struct { int flg; double val; } stStopFitness;
00081 double stopTolFun;
00082 double stopTolFunHist;
00083 double stopTolX;
00084 double stopTolUpXFactor;
00085
00086
00087 int lambda;
00088 int mu;
00089 double mucov, mueff;
00090 double *weights;
00091 double damps;
00092 double cs;
00093 double ccumcov;
00094 double ccov;
00095 struct { int flgalways; double modulo; double maxtime; } updateCmode;
00096 double facupdateCmode;
00097
00098
00099
00100 char *weigkey;
00101 char resumefile[99];
00102 const char **rgsformat;
00103 void **rgpadr;
00104 const char **rgskeyar;
00105 double ***rgp2adr;
00106 int n1para, n1outpara;
00107 int n2para;
00108 } readpara_t;
00109
00110 typedef
00111 struct
00112
00113
00114
00115 {
00116 const char *version;
00117 readpara_t sp;
00118 random_t rand;
00119
00120 double sigma;
00121
00122 double *rgxmean;
00123 double *rgxbestever;
00124 double **rgrgx;
00125 int *index;
00126 double *arFuncValueHist;
00127
00128 short flgIniphase;
00129 short flgStop;
00130
00131 double chiN;
00132 double **C;
00133 double **B;
00134 double *rgD;
00135
00136 double *rgpc;
00137 double *rgps;
00138 double *rgxold;
00139 double *rgout;
00140 double *rgBDz;
00141 double *rgdTmp;
00142 double *rgFuncValue;
00143 double *publicFitness;
00144
00145 double gen;
00146 double countevals;
00147 double state;
00148
00149 double maxdiagC;
00150 double mindiagC;
00151 double maxEW;
00152 double minEW;
00153
00154 char sOutString[330];
00155
00156 short flgEigensysIsUptodate;
00157 short flgCheckEigen;
00158 double genOfEigensysUpdate;
00159 timings_t eigenTimings;
00160
00161 double dMaxSignifKond;
00162 double dLastMinEWgroesserNull;
00163
00164 short flgresumedone;
00165
00166 time_t printtime;
00167 time_t writetime;
00168 time_t firstwritetime;
00169 time_t firstprinttime;
00170
00171 } cmaes_t;
00172
00173
00174 #endif