⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tsp.h

📁 本程序实现了NPC问题旅行商的三个近似算法。
💻 H
字号:
#define N 32
#include <iostream.h>
#include <stdio.h>
#include <algorithm>
using namespace std;

class tsp
{
public:
	tsp();
	~tsp();
	bool LoadGraph();
	bool NearestNeighbor();
	bool ShortestLinkHeuristic();
	bool NearestInsertion();
	int findaedge(bool *, int);
private:
	int iCityNum;
	int Graph[N][N];
};

struct edge_info
{
	int fee;
	int c1, c2;
};

struct link_state
{
	int p[2], neighbor;
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -