global.h
来自「遗传算法实现旅行商问题:经典遗传算法解决旅行商问题」· C头文件 代码 · 共 44 行
H
44 行
#ifndef H_GLOBAL
#define H_GLOBAL
#pragma warning(disable:4786)
#define NOEVOLUTE 50
#define TOTALEVOLUTE 1000
#define CITYCOUNT 9
#include <set>
#include <vector>
#include <map>
#include <iostream>
#include <algorithm>
#include <fstream>
#include "time.h"
#include "math.h"
using namespace std;
typedef vector<int> VectorInt;
typedef VectorInt::iterator viter;
typedef map<int,int> MapInt;
typedef MapInt::iterator miter;
class Individual; //向前声明
class CityLayout;
class Group;
typedef vector<Individual> VectorIdv;
typedef VectorIdv::iterator vindviter;
extern CityLayout layout; //声明,不是定义,定义才分配内存空间的,让多个文件访问相同变量
#include "Individual.h"
#include "ityLayout.h"
#include "Group.h"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?