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

📄 desert.h

📁 该算法设计短小精悍
💻 H
字号:

#include <fstream.h>
///////////////////////////////////////////////////////////////////////////
// class name:	Desert
// aurthor:		Zhang Zhenjie
// date:		2004.9.27
// version:		1.0
//		description: basic definintion of the variables and functions
///////////////////////////////////////////////////////////////////////////
class Desert  
{
private:
	
	int desertWidth;				//the width of the desert
	int surviveDistance;			//the longest distance a travellor can survive
	int vertexNum;					//vertex number
	int startVertex;				//the start vertex
	int endVertex;					//the destination
	int impossibleLength;			//the longest distance which must exceed any reachable distance

	int* x_cor;						//x cordinate
	int* y_cor;						//y cordinate
	int* bestSolution;				//best solution for every vertex
	bool* isComplete;				//whether we have get the solution for one vertex
	int** distanceMatrix;			//the distance matrix

public:
	int GetSoltion();				//compute the solution
	void GetDistance();				//get the distance and initilize
	Desert();			//constructor
	virtual ~Desert();				//destructor

};

⌨️ 快捷键说明

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