SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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 1326 of file cmty.cpp.

Constructor & Destructor Documentation

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

Definition at line 1330 of file cmty.cpp.

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

Definition at line 1331 of file cmty.cpp.

Member Function Documentation

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

Definition at line 1333 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().

1333  {
1334  NIdQH.AddDat(NId, Q);
1335  if (MxQId == -1 || NIdQH[MxQId]<Q) { MxQId = NIdQH.GetKeyId(NId); }
1336  }
int GetKeyId(const TKey &Key) const
Definition: hash.h:466
TDat & AddDat(const TKey &Key)
Definition: hash.h:238

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 1343 of file cmty.cpp.

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

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

1343  {
1344  const int NId = GetMxQNId();
1345  NIdQH.DelKey(K); if (NId == K) { UpdateMaxQ(); }
1346  }
void DelKey(const TKey &Key)
Definition: hash.h:404

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 1348 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 1347 of file cmty.cpp.

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

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

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

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 1337 of file cmty.cpp.

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

Referenced by DelLink().

1337  {
1338  MxQId = -1;
1339  for (int i = -1; NIdQH.FNextKeyId(i);) {
1340  if (MxQId == -1 || NIdQH[MxQId]< NIdQH[i]) { MxQId = i; }
1341  }
1342  }
bool FNextKeyId(int &KeyId) const
Definition: hash.h:478

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 1327 of file cmty.cpp.

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

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

Definition at line 1329 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: