00001 #ifndef _bbobStructures_H
00002 #define _bbobStructures_H
00003
00004
00005
00006
00007
00008 #ifndef M_PI
00009 #define M_PI 3.14159265358979323846
00010 #endif
00011
00012
00013 struct twoDoubles {
00014 double Ftrue;
00015 double Fval;
00016 };
00017
00018 typedef struct twoDoubles TwoDoubles;
00019
00020
00021 typedef struct twoDoubles (*bbobFunction)(double *);
00022
00023
00024
00025
00026
00027 #define DefaultStringLength 1024
00028
00029 #define DIM_MAX 500
00030
00031
00032
00033
00034
00035 struct paramStruct{
00036
00037
00038
00039
00040 char inputFormat[4];
00041
00042
00043
00044 char algName[DefaultStringLength];
00045
00046
00047
00048
00049
00050
00051 char comments[DefaultStringLength];
00052
00053
00054 char dataPath[DefaultStringLength];
00055
00056
00057
00058 char filePrefix[DefaultStringLength];
00059
00060
00061 unsigned int DIM;
00062
00063
00064 double precision;
00065
00066
00067 unsigned int funcId;
00068
00069
00070 unsigned int instanceId;
00071
00072
00073 char indexFilePrefix[DefaultStringLength];
00074
00075
00076 char indexFile[DefaultStringLength];
00077
00078
00079 char dataFilePrefix[DefaultStringLength];
00080 char dataFilePrefixNameOnly[DefaultStringLength];
00081
00082
00083 char dataFile[DefaultStringLength];
00084 char dataFileNameOnly[DefaultStringLength];
00085
00086
00087 char hdataFile[DefaultStringLength];
00088 char hdataFileNameOnly[DefaultStringLength];
00089
00090
00091 unsigned int dataFileSuffix;
00092
00093
00094 unsigned int runCounter;
00095
00096 } ;
00097
00098 typedef struct paramStruct ParamStruct;
00099
00100
00101
00102
00103 struct lastEvalStruct {
00104
00105 unsigned int num;
00106
00107
00108 double F;
00109
00110
00111 double Fnoisy;
00112
00113
00114 double bestFnoisy;
00115
00116
00117 double x[DIM_MAX];
00118
00119
00120 int isWritten;
00121 } ;
00122
00123 typedef struct lastEvalStruct LastEvalStruct;
00124
00125
00126
00127
00128
00129 double fgeneric_initialize(ParamStruct PARAMS);
00130 double fgeneric_finalize();
00131 double fgeneric_evaluate(double * X);
00132 double fgeneric_ftarget();
00133 unsigned int fgeneric_maxevals(unsigned int DIM);
00134 unsigned int fgeneric_evaluations();
00135 double fgeneric_best();
00136 void fgeneric_noiseseed(unsigned int seed);
00137 ParamStruct fgeneric_getDefaultPARAMS();
00138
00139 #endif