SNAP Library , Developer Reference  2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TArtPointVisitor Class Reference

#include <cncom.h>

Collaboration diagram for TArtPointVisitor:

List of all members.

Public Member Functions

 TArtPointVisitor ()
 TArtPointVisitor (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, TIntPrVnLowH
THash< TInt, TIntParentH
TIntSet ArtSet
TInt Time

Detailed Description

Articulation point Depth-First-Search visitor class.

Definition at line 152 of file cncom.h.


Constructor & Destructor Documentation

Definition at line 159 of file cncom.h.

{ }
TArtPointVisitor::TArtPointVisitor ( const int &  Nodes) [inline]

Definition at line 160 of file cncom.h.

: VnLowH(Nodes), ParentH(Nodes)  { }

Member Function Documentation

void TArtPointVisitor::BackEdge ( const int &  NId1,
const int &  NId2 
) [inline]

Definition at line 169 of file cncom.h.

References THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), TMath::Mn(), ParentH, TPair< TVal1, TVal2 >::Val1, TPair< TVal1, TVal2 >::Val2, and VnLowH.

                                                  {
    if (ParentH.IsKey(NId1) && ParentH.GetDat(NId1)!=NId2) {
      VnLowH.GetDat(NId1).Val2 = TMath::Mn(VnLowH.GetDat(NId1).Val2, VnLowH.GetDat(NId2).Val1); } }

Here is the call graph for this function:

void TArtPointVisitor::DiscoverNode ( int  NId) [inline]

Definition at line 161 of file cncom.h.

References THash< TKey, TDat, THashFunc >::AddDat(), Time, and VnLowH.

{ Time++; VnLowH.AddDat(NId, TIntPr(Time, Time)); }

Here is the call graph for this function:

void TArtPointVisitor::ExamineEdge ( const int &  NId1,
const int &  NId2 
) [inline]

Definition at line 167 of file cncom.h.

{ }
void TArtPointVisitor::FinishNode ( const int &  NId) [inline]

Definition at line 162 of file cncom.h.

References THashSet< TKey, THashFunc >::AddKey(), ArtSet, THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), TMath::Mn(), ParentH, 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(Prn).Val1==1 && VnLowH.GetDat(NId).Val1!=2) { ArtSet.AddKey(Prn); }
    if (VnLowH.GetDat(Prn).Val1!=1 && VnLowH.GetDat(NId).Val2>=VnLowH.GetDat(Prn).Val1) { ArtSet.AddKey(Prn); } }

Here is the call graph for this function:

void TArtPointVisitor::FwdEdge ( const int &  NId1,
const int &  NId2 
) [inline]

Definition at line 172 of file cncom.h.

References THash< TKey, TDat, THashFunc >::GetDat(), TMath::Mn(), TPair< TVal1, TVal2 >::Val1, TPair< TVal1, TVal2 >::Val2, and VnLowH.

                                                 {
    VnLowH.GetDat(NId1).Val2 = TMath::Mn(VnLowH.GetDat(NId1).Val2, VnLowH.GetDat(NId2).Val1); }

Here is the call graph for this function:

void TArtPointVisitor::TreeEdge ( const int &  NId1,
const int &  NId2 
) [inline]

Definition at line 168 of file cncom.h.

References THash< TKey, TDat, THashFunc >::AddDat(), and ParentH.

{ ParentH.AddDat(NId2, NId1); }

Here is the call graph for this function:


Member Data Documentation

Definition at line 156 of file cncom.h.

Referenced by FinishNode().

Definition at line 155 of file cncom.h.

Referenced by BackEdge(), FinishNode(), and TreeEdge().

Definition at line 157 of file cncom.h.

Referenced by DiscoverNode().

Definition at line 154 of file cncom.h.

Referenced by BackEdge(), DiscoverNode(), FinishNode(), and FwdEdge().


The documentation for this class was generated from the following file: