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 200
00030
00031
00032
00033
00034
00035 struct paramStruct{
00036
00037
00038
00039
00040 char algName[DefaultStringLength];
00041
00042
00043
00044
00045
00046
00047 char comments[DefaultStringLength];
00048
00049
00050 char dataPath[DefaultStringLength];
00051
00052
00053
00054 char filePrefix[DefaultStringLength];
00055
00056
00057 unsigned int DIM;
00058
00059
00060 double precision;
00061
00062
00063 unsigned int funcId;
00064
00065
00066 unsigned int instanceId;
00067
00068
00069 char indexFilePrefix[DefaultStringLength];
00070
00071
00072 char indexFile[DefaultStringLength];
00073
00074
00075 char dataFilePrefix[DefaultStringLength];
00076 char dataFilePrefixNameOnly[DefaultStringLength];
00077
00078
00079 char dataFile[DefaultStringLength];
00080 char dataFileNameOnly[DefaultStringLength];
00081
00082
00083 char hdataFile[DefaultStringLength];
00084 char hdataFileNameOnly[DefaultStringLength];
00085
00086
00087 char rdataFile[DefaultStringLength];
00088 char rdataFileNameOnly[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 double 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 #ifdef __cplusplus
00129 extern "C"{
00130 #endif
00131 double fgeneric_initialize(ParamStruct PARAMS);
00132 double fgeneric_finalize(void);
00133 double fgeneric_evaluate(double * X);
00134 double fgeneric_ftarget(void);
00135 double fgeneric_maxevals(unsigned int DIM);
00136 double fgeneric_evaluations(void);
00137 double fgeneric_best(void);
00138 void fgeneric_restart(char * restart_reason);
00139 int fgeneric_exist(unsigned int FUNC_ID);
00140 void fgeneric_noiseseed(unsigned long seed);
00141 ParamStruct fgeneric_getDefaultPARAMS(void);
00142 #ifdef __cplusplus
00143 }
00144 #endif
00145
00146
00147 #endif