SNAP Library , Developer Reference
2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#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] |
Definition at line 207 of file cncom.h.
References THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), TMath::Mn(), ParentH, TSStack< TVal >::Push(), Stack, TPair< TVal1, TVal2 >::Val1, TPair< TVal1, TVal2 >::Val2, and VnLowH.
{ if (ParentH.IsKey(NId1) && ParentH.GetDat(NId1)!=NId2) { Stack.Push(TIntPr(NId1, NId2)); VnLowH.GetDat(NId1).Val2 = TMath::Mn(VnLowH.GetDat(NId1).Val2, VnLowH.GetDat(NId2).Val1); } }
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 190 of file cncom.h.
References TVec< TVal >::Add(), THashSet< TKey, THashFunc >::AddKey(), THashSet< TKey, THashFunc >::Clr(), TSStack< TVal >::Empty(), THash< TKey, TDat, THashFunc >::GetDat(), THashSet< TKey, THashFunc >::GetKeyV(), THash< TKey, TDat, THashFunc >::IsKey(), TMath::Mn(), NSet, ParentH, TSStack< TVal >::Pop(), TVec< TVal >::Sort(), Stack, TSStack< TVal >::Top(), TPair< TVal1, TVal2 >::Val1, TPair< TVal1, TVal2 >::Val2, and VnLowH.
{ 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] |
Definition at line 184 of file cncom.h.
Referenced by FinishNode().
Definition at line 181 of file cncom.h.
Referenced by BackEdge(), FinishNode(), and TreeEdge().
Definition at line 182 of file cncom.h.
Referenced by BackEdge(), FinishNode(), and TreeEdge().
Definition at line 185 of file cncom.h.
Referenced by DiscoverNode().
Definition at line 180 of file cncom.h.
Referenced by BackEdge(), DiscoverNode(), and FinishNode().