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

📄 clspoint.~h

📁 最小生成树的算法范例
💻 ~H
字号:
/*
;=============================================================================
; 名称:clsPOINT
;=============================================================================
; 描述:节点,用来存放入开启或者关闭列表
;=============================================================================
*/
class clsPOINT{
public:
	clsPOINT(int tx, int ty, int tfather_d = 5, int tg = 0, int th = 0):
	         x(tx), y(ty), father_d(tfather_d), g(tg), h(tg){}
	int x;
	int y;
	int father_d;
	int g;
	int h;
	int f(){return g + h;}
};

/*
;=============================================================================
; 名称:clsNODE
;=============================================================================
; 描述:节点,用来存放入开启或者关闭列表
;=============================================================================
*/
class clsNODE{
public:
	int x;
	int y;
	int father_d;     //父节点的方向
	int g;
	int h;
	int f;
	int Flag;         //节点标志 0 通行,未检查过
	                  //         1 不通行
	                  //         2 开启,通行
	                  //         3 关闭,通行
	                  //        -1 路径,通行
	int openlist_id;  //保存自己在开启列表中的索引,每个节点都唯一
};

⌨️ 快捷键说明

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