This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<random> | |
#include<math.h> | |
using namespace std; | |
//群体中的粒子数 | |
#define SWARMSIZE 10 | |
//值域大小 值域为:x为[0,SPACESIZE] | |
#define SPACESIZE 2 | |
//迭代次数 | |
static int generNum = 100; |