文件名称:Graph-traversal
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
图的遍历:
(1)访问初始顶点v并标记顶点v已访问。
(2)查找顶点v的第一个邻接顶点w。
(3)若顶点v的邻接顶点w存在,则继续执行;否则回溯到v,再找v的另外一个未访问过的邻接点。
(4)若顶点w尚未被访问,则访问顶点w并标记顶点w为已访问。
(5)继续查找顶点w的下一个邻接顶点wi,如果v取值wi转到步骤(3)。直到连通图中所有顶点全部访问过为止。
(1)顶点v入队列。
(2)当队列非空时则继续执行,否则算法结束。
(3)出队列取得队头顶点v;访问顶点v并标记顶点v已被访问。
(4)查找顶点v的第一个邻接顶点col。
(5)若v的邻接顶点col未被访问过的,则col入队列。
(6)继续查找顶点v的另一个新的邻接顶点col,转到步骤(5)。直到顶点v的所有未被访问过的邻接点处理完。转到步骤(2)。-Graph traversal:
(1) Access the initial vertex v and marked vertex v visited.
(2) Find the first vertex v adjacent vertices w.
(3) If the vertex v of adjacent vertices w exist, continue otherwise go back to v, v to find another one unvisited neighbor.
(4) If the vertex w has not been accessed, the access vertices w and marked as visited vertex w.
(5) continues to find the next vertex adjacent vertices w wi, wi If v is the value to the step (3). Until all connected graphs all vertices visited so far.
(A) vertex v into the queue.
(2) When the queue is not empty, then continue, otherwise the algorithm terminates.
(3) the head of the queue to obtain team points v visit vertex v and marked vertex v has been visited.
(4) Find the first vertex v adjacent vertices col.
(5) If v is adjacent vertices col unvisited, then col into the queue.
(6) continue to find another new vertex v adjacent vertices col, go to step (5). Until all vertices v adjacent unvisited point processed. G
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Graph traversal\图的遍历.cpp
...............\图的遍历.txt
Graph traversal