|
SNAP Library 2.0, User Reference
2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Biconnected componetns Depth-First-Search visitor class. More...
#include <cncom.h>
Public Member Functions | |
| TBiConVisitor () | |
| TBiConVisitor (const int &Nodes) | |
| void | DiscoverNode (int NId) |
| void | FinishNode (const int &NId) |
| void | ExamineEdge (const int &NId1, const int &NId2) |
| void | TreeEdge (const int &NId1, const int &NId2) |
| void | BackEdge (const int &NId1, const int &NId2) |
| void | FwdEdge (const int &NId1, const int &NId2) |
Public Attributes | |
| THash< TInt, TIntPr > | VnLowH |
| THash< TInt, TInt > | ParentH |
| TSStack< TIntPr > | Stack |
| TCnComV | CnComV |
| TIntSet | NSet |
| TInt | Time |
| TBiConVisitor::TBiConVisitor | ( | ) | [inline] |
| TBiConVisitor::TBiConVisitor | ( | const int & | Nodes | ) | [inline] |
| void TBiConVisitor::BackEdge | ( | const int & | NId1, |
| const int & | NId2 | ||
| ) | [inline] |
| void TBiConVisitor::DiscoverNode | ( | int | NId | ) | [inline] |
| void TBiConVisitor::ExamineEdge | ( | const int & | NId1, |
| const int & | NId2 | ||
| ) | [inline] |
| void TBiConVisitor::FinishNode | ( | const int & | NId | ) | [inline] |
Definition at line 202 of file cncom.h.
{
if (! ParentH.IsKey(NId)) { return; } const int Prn = ParentH.GetDat(NId);
VnLowH.GetDat(Prn).Val2 = TMath::Mn(VnLowH.GetDat(Prn).Val2, VnLowH.GetDat(NId).Val2);
if (VnLowH.GetDat(NId).Val2 >= VnLowH.GetDat(Prn).Val1) {
NSet.Clr(false);
while (! Stack.Empty() && Stack.Top() != TIntPr(Prn, NId)) {
const TIntPr& Top = Stack.Top();
NSet.AddKey(Top.Val1); NSet.AddKey(Top.Val2); Stack.Pop(); }
if (! Stack.Empty()) {
const TIntPr& Top = Stack.Top();
NSet.AddKey(Top.Val1); NSet.AddKey(Top.Val2); Stack.Pop(); }
TIntV NIdV; NSet.GetKeyV(NIdV); NIdV.Sort();
CnComV.Add(NIdV); } }
| void TBiConVisitor::FwdEdge | ( | const int & | NId1, |
| const int & | NId2 | ||
| ) | [inline] |
| void TBiConVisitor::TreeEdge | ( | const int & | NId1, |
| const int & | NId2 | ||
| ) | [inline] |