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

📄 tsp_data.h

📁 TSP的智能算法
💻 H
字号:
////////////////////////////////////////////////////////////
// This virsion is AntSystem 1.0
// author: zhaochaoqing ChongQing University
//
//the author can be contacted at:
//   Email: zh_iostream@126.com
//
////////////////////////////////////////////////////////////

//
// TSP_data.h :interface for TPS_data class
////////////////////////////////////////////////////////////

#if !defined (TSP_DATA_HIHDKFH_DHFNLKDHFOOJFD_)
#define TSP_DATA_HIHDKFH_DHFNLKDHFOOJFD_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

using namespace std;

class TSP_node;

class TSP_data
{
public:
	
	void Initialize(int nSize);
	void ReadFile();
	int GetDim() const;
	void DistoryData();
	int GetWeightAt(int nFrom,int nTo){return m_aWeights[nFrom][nTo];}

	TSP_data();
	virtual ~TSP_data();

	TSP_node* GetAt(int nIdx);
	int ComputeDistance(TSP_node *ps, TSP_node *pd);



private:
	TSP_node **m_aNodes;         // 1D array of nodes
	int**		m_aWeights;		// 2D array of weights
	double	m_dMaxX;	// for scaling the display (zoom)
	double	m_dMaxY;
	int		m_nDim;

};



#endif

⌨️ 快捷键说明

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