本文整理汇总了C++中node::adj_edges_begin方法的典型用法代码示例。如果您正苦于以下问题:C++ node::adj_edges_begin方法的具体用法?C++ node::adj_edges_begin怎么用?C++ node::adj_edges_begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类node
的用法示例。
在下文中一共展示了node::adj_edges_begin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dfs_sub
void pathfinder::dfs_sub (node& curr, node& father)
{
low_num[curr] = dfs_num[curr] = act_dfs_num++;
new_nodes--;
node::adj_edges_iterator it = curr.adj_edges_begin();
node::adj_edges_iterator end = curr.adj_edges_end();
while (it != end) {
edge adj = *it;
node opp = curr.opposite(adj);
if (dfs_num[opp] == 0) {
list<edge>::iterator tmp =
tree[curr].insert (tree[curr].end(), adj);
to_father[opp] = tmp;
dfs_sub (opp, curr);
if (low_num[opp] < low_num[curr]) {
low_num[curr] = low_num[opp];
to_low[curr] = tmp;
}
if (low_num[opp] >= dfs_num[curr]) {
is_biconn = false;
}
} else if (opp != father && dfs_num[opp] < dfs_num[curr]) {
list<edge>::iterator back_pos =
back[curr].insert (back[curr].end(), adj);
list<edge>::iterator forward_pos =
forward[opp].insert (forward[opp].end(), adj);
pos[adj] = pos_pair (forward_pos, back_pos);
if (dfs_num[opp] < low_num[curr]) {
low_num[curr] = dfs_num[opp];
to_low[curr] = back_pos;
}
}
++it;
}
}