SNAP Library 2.3, Developer Reference  2014-06-16 11:58:46
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat Struct Reference
Collaboration diagram for TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat:

Public Member Functions

 TCmtyDat ()
 
 TCmtyDat (const double &NodeDegFrac, const int &OutDeg)
 
void AddQ (const int &NId, const double &Q)
 
void UpdateMaxQ ()
 
void DelLink (const int &K)
 
int GetMxQNId () const
 
double GetMxQ () const
 

Public Attributes

double DegFrac
 
TIntFltH NIdQH
 
int MxQId
 

Detailed Description

Definition at line 194 of file cmty.cpp.

Constructor & Destructor Documentation

TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::TCmtyDat ( )
inline

Definition at line 198 of file cmty.cpp.

TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::TCmtyDat ( const double &  NodeDegFrac,
const int &  OutDeg 
)
inline

Definition at line 199 of file cmty.cpp.

Member Function Documentation

void TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::AddQ ( const int &  NId,
const double &  Q 
)
inline

Definition at line 201 of file cmty.cpp.

References THash< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::GetKeyId(), MxQId, and NIdQH.

Referenced by TSnap::TSnapDetail::TCNMQMatrix::Init(), and TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ().

201  { NIdQH.AddDat(NId, Q);
202  if (MxQId==-1 || NIdQH[MxQId]<Q) { MxQId=NIdQH.GetKeyId(NId); } }
int GetKeyId(const TKey &Key) const
Definition: hash.h:420
TDat & AddDat(const TKey &Key)
Definition: hash.h:196

Here is the call graph for this function:

Here is the caller graph for this function:

void TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::DelLink ( const int &  K)
inline

Definition at line 206 of file cmty.cpp.

References THash< TKey, TDat, THashFunc >::DelKey(), GetMxQNId(), NIdQH, and UpdateMaxQ().

Referenced by TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ().

206  { const int NId=GetMxQNId();
207  NIdQH.DelKey(K); if (NId==K) { UpdateMaxQ(); } }
void DelKey(const TKey &Key)
Definition: hash.h:358

Here is the call graph for this function:

Here is the caller graph for this function:

double TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::GetMxQ ( ) const
inline

Definition at line 209 of file cmty.cpp.

References MxQId, and NIdQH.

Referenced by TSnap::TSnapDetail::TCNMQMatrix::Init().

Here is the caller graph for this function:

int TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::GetMxQNId ( ) const
inline

Definition at line 208 of file cmty.cpp.

References THash< TKey, TDat, THashFunc >::GetKey(), MxQId, and NIdQH.

Referenced by DelLink(), and TSnap::TSnapDetail::TCNMQMatrix::Init().

208 { return NIdQH.GetKey(MxQId); }
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:210

Here is the call graph for this function:

Here is the caller graph for this function:

void TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::UpdateMaxQ ( )
inline

Definition at line 203 of file cmty.cpp.

References THash< TKey, TDat, THashFunc >::FNextKeyId(), MxQId, and NIdQH.

Referenced by DelLink().

203  { MxQId=-1;
204  for (int i = -1; NIdQH.FNextKeyId(i); ) {
205  if (MxQId==-1 || NIdQH[MxQId]< NIdQH[i]) { MxQId=i; } } }
bool FNextKeyId(int &KeyId) const
Definition: hash.h:432

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

double TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::DegFrac

Definition at line 195 of file cmty.cpp.

Referenced by TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ().

int TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::MxQId

Definition at line 197 of file cmty.cpp.

Referenced by AddQ(), GetMxQ(), GetMxQNId(), and UpdateMaxQ().

TIntFltH TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::NIdQH

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