文件名称:Graph-traversal

  • 所属分类:
  • WEB源码
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2013-11-21
  • 文件大小:
  • 2kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • c*
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!
下载
别用迅雷、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

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org