文件名称:bianli
介绍说明--下载内容均来自于网络,请自行研究使用
图的深度及广度遍历
首先创建一个无向图,顶点用一个一维数组存储,弧用一个二维数组存储,不相邻顶点之间设置无限大。深度遍历时设置顶点的布尔函数,访问过的顶点布尔值为true,递归调用DFS函数。广度遍历时,结合队列的存储方式,进行遍历。-Figure traverse the depth and breadth of First create a non-directed graph, vertex with a one-dimensional array to store the arc with a two-dimensional array to store non-adjacent vertices between the infinite set. Boolean function, set deep traversal vertices visited vertex boolean value true recursive call DFS function. Breadth traversal, combined with the queue storage traversal.
首先创建一个无向图,顶点用一个一维数组存储,弧用一个二维数组存储,不相邻顶点之间设置无限大。深度遍历时设置顶点的布尔函数,访问过的顶点布尔值为true,递归调用DFS函数。广度遍历时,结合队列的存储方式,进行遍历。-Figure traverse the depth and breadth of First create a non-directed graph, vertex with a one-dimensional array to store the arc with a two-dimensional array to store non-adjacent vertices between the infinite set. Boolean function, set deep traversal vertices visited vertex boolean value true recursive call DFS function. Breadth traversal, combined with the queue storage traversal.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
bianli.doc