| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 论坛
 上传资源
上传编程相关的资源,源源不断赚取资源分,以备将来下载之需
ronggege
文件大小:2.24 KB
文件类型:rar
发布时间:2013-09-06 18:52:23
需资源分:1
下载次数:3
Tag:图的深度  广度  搜索
::资源简介::
template <int max_size>void Digraph<max_size> :: depth_first(void (*visit)(Vertex &)) const
/* Post: The function *visit has been performed at each vertex of the Digraph in depth-first order.
Uses: Method traverse to produce the recursive depth-first order. */
{
bool visited [max_size];
Vertex v;
for (all v in G) visited [v] = false;
for (all v in G) if (!visited [v])
traverse (v, visited, visit);
}
template <int max_size>
void Digraph<max_size>::traverse(Vertex &v, bool visited[ ],void (*visit)(Vertex &)) const
/* Pre: v is a vertex of the Digraph.
Post: The depth-first traversal
::下载地址::

BCCN本地下载 
开通VIP
可免资源分下载所有资源
::下载本资源的人也下载了::
::作者其它资源::
 
>> 评论
 
热门Tag:
 
编程中国 版权所有,并保留所有权利。 在线客服
微信扫码咨询

Powered by BCCN 1.020, Processed in 0.004505 second(s)
Copyright©2010-2024, BCCN.NET, All Rights Reserved

在线客服
微信扫码咨询