objective.h
来自「多目标优化进化算法目前公认效果收敛性最好的算法NSGA2c++源码,具有一般性」· C头文件 代码 · 共 70 行
H
70 行
///////////////////////////////////////////////////////////////////
/*****************************************************************
Copyright: Artificial Life and Adaptive Robotics Laboratory - ALAR
School of ITEE, UNSW@ADFA, Australia, 2005
*******************************************************************/
///////////////////////////////////////////////////////////////////#if !defined(AFX_OBJECTIVE_H__5A70A73D_DAB9_4EE2_894C_406533E9A2CD__INCLUDED_)#define AFX_OBJECTIVE_H__5A70A73D_DAB9_4EE2_894C_406533E9A2CD__INCLUDED_#if _MSC_VER > 1000#pragma once#endif // _MSC_VER > 1000#include <math.h>#include <iostream.h>#include <string.h>#include <iomanip.h>#include <fstream.h>#include <stdio.h>#include "consts.h"#include "Random.h"#include "movpeaks.h"extern double lambda;extern int use_basis_function;extern int geno_size;extern double maxheight;extern double global_max;class objective {private:// int objectiveID;public: void logging(); void peaksetting(int size); double problem1(double *x,int size,int funcID);
double problem2(double *x,int size,int funcID);
double problem3(double *x,int size,int funcID);
double problem4(double *x,int size,int funcID);
double problem5(unsigned int *x,int size,int funcID);
double problem6(double *x,int size,int funcID);
double problem7(double *x, int size, int funcID, int evaltime, int gen);
double problem8(double *x, int size, int funcID, int evaltime, int gen);
double problem9(double *x, int size, int funcID, int evaltime, int gen);
double problem10(double *x, int size, int funcID, int evaltime, int gen);
double problem11(double *x, int size, int funcID, int evaltime, int gen);
double problem12(double *x, int size, int funcID, int evaltime, int gen); void setObjID(int ID); //double objective_value1(double , double ,double (objective::*fp)(double,double)); double (objective::*objective_value)(double *,int,int); objective(int ID); objective(); virtual ~objective(); //double *prev_s; Random rnd; //random generator //int cycle; int probID, cur_SEED;
double al_pc, al_pm; ofstream f1;};#endif // !defined(AFX_OBJECTIVE_H__5A70A73D_DAB9_4EE2_894C_406533E9A2CD__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?