函数Biconnected实现了上述过程-数据结构数据结构

时间:2024-05-16 03:05:11
【文件属性】:

文件名称:函数Biconnected实现了上述过程-数据结构数据结构

文件大小:4.19MB

文件格式:PPT

更新时间:2024-05-16 03:05:11

数据数据

函数Biconnected实现了上述过程: void Graph::Biconnected ( ) { num = 1; dfn = new int[n]; low = new int[n]; for ( int i = 0; i < n; i++ ) { dfn[i] = low[i] = 0; } Biconnected (0, -1); // 从顶点0开始 delete [ ] dfn; delete [ ] low; } void Graph::Biconnected (int u, int v) { // 计算dfn和low,并输 // 出各双连分量的边。v是u 的双亲,栈S是Graph的数 // 据成员,并被初始化为空。假设n>1。 dfn[u] = low[u] = num++;


网友评论