文件名称:布线问题(分支限界算法应用)
介绍说明--下载内容均来自于网络,请自行研究使用
六 程序实现:
#include <stdio.h>
typedef struct {
int row
int col
}Position
int FindPath (Position start, Position finish, int &PathLen, Position *&path)
{ //计算从起始位置start到目标位置finish的最短布线路径,找到返回1,否则,返回0
int i
if ((start.row = = finish.row) && (start.col = = finish.col)) {
PathLen = 0 return 0 } //start = finish
//设置方格阵列”围墙”
for (i = 0 i <= m+1 i++)
grid[0][i] = grid[n+1
-6 program :# include
#include <stdio.h>
typedef struct {
int row
int col
}Position
int FindPath (Position start, Position finish, int &PathLen, Position *&path)
{ //计算从起始位置start到目标位置finish的最短布线路径,找到返回1,否则,返回0
int i
if ((start.row = = finish.row) && (start.col = = finish.col)) {
PathLen = 0 return 0 } //start = finish
//设置方格阵列”围墙”
for (i = 0 i <= m+1 i++)
grid[0][i] = grid[n+1
-6 program :# include
(系统自动生成,下载前可以参看下载内容)
下载文件列表
布线问题(分支限界算法应用).doc