SNAP Library 6.0, Developer Reference
2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <cliques.h>
Public Member Functions | |
TCliqueOverlap () | |
void | GetMaximalCliques (const PUNGraph &G, int MinMaxCliqueSize, TVec< TIntV > &MaxCliques) |
Static Public Member Functions | |
static void | GetRelativeComplement (const THashSet< TInt > &A, const THashSet< TInt > &B, THashSet< TInt > &Complement) |
static void | GetIntersection (const THashSet< TInt > &A, const THashSet< TInt > &B, THashSet< TInt > &C) |
static int | Intersection (const THashSet< TInt > &A, const THashSet< TInt > &B) |
static void | CalculateOverlapMtx (const TVec< TIntV > &MaxCliques, int MinNodeOverlap, TVec< TIntV > &OverlapMtx) |
static PUNGraph | CalculateOverlapMtx (const TVec< TIntV > &MaxCliques, int MinNodeOverlap) |
static void | GetOverlapCliques (const TVec< TIntV > &OverlapMtx, int MinNodeOverlap, TVec< TIntV > &CliqueIdVV) |
static void | GetOverlapCliques (const TVec< TIntV > &OverlapMtx, const TVec< TIntV > &MaxCliques, double MinOverlapFrac, TVec< TIntV > &CliqueIdVV) |
static void | GetMaxCliques (const PUNGraph &G, int MinMaxCliqueSize, TVec< TIntV > &MaxCliques) |
Enumerate maximal cliques of the network on more than MinMaxCliqueSize nodes. More... | |
static void | GetCPMCommunities (const PUNGraph &G, int MinMaxCliqueSize, TVec< TIntV > &Communities) |
Clique Percolation method communities. More... | |
Private Member Functions | |
void | GetNbrs (int NId, THashSet< TInt > &Nbrs) const |
int | GetNodeIdWithMaxDeg (const THashSet< TInt > &Set) const |
int | MaxNbrsInCANDNodeId (const THashSet< TInt > &SUBG, const THashSet< TInt > &CAND) const |
void | Expand (const THashSet< TInt > &SUBG, THashSet< TInt > &CAND) |
Private Attributes | |
PUNGraph | m_G |
TIntV | m_Q |
TVec< TIntV > * | m_maxCliques |
int | m_minMaxCliqueSize |
|
static |
Definition at line 127 of file cliques.cpp.
References TVec< TVal, TSizeTy >::Add(), THashSet< TKey, THashFunc >::AddKey(), TVec< TVal, TSizeTy >::Clr(), TVec< TVal, TSizeTy >::Gen(), THashSet< TKey, THashFunc >::Gen(), Intersection(), TVec< TVal, TSizeTy >::Last(), and TVec< TVal, TSizeTy >::Len().
Referenced by GetCPMCommunities().
|
static |
Definition at line 152 of file cliques.cpp.
References TVec< TVal, TSizeTy >::Add(), TUNGraph::AddEdge(), THashSet< TKey, THashFunc >::AddKey(), TUNGraph::AddNode(), THashSet< TKey, THashFunc >::Gen(), Intersection(), TVec< TVal, TSizeTy >::Last(), TVec< TVal, TSizeTy >::Len(), and TUNGraph::New().
Definition at line 73 of file cliques.cpp.
References TVec< TVal, TSizeTy >::Add(), THashSet< TKey, THashFunc >::Clr(), THashSet< TKey, THashFunc >::DelKey(), TVec< TVal, TSizeTy >::DelLast(), GetIntersection(), GetNbrs(), GetNodeIdWithMaxDeg(), GetRelativeComplement(), TVec< TVal, TSizeTy >::Len(), THashSet< TKey, THashFunc >::Len(), m_maxCliques, m_minMaxCliqueSize, m_Q, MaxNbrsInCANDNodeId(), and TVec< TVal, TSizeTy >::Pack().
Referenced by GetMaximalCliques().
|
static |
Clique Percolation method communities.
Definition at line 224 of file cliques.cpp.
References TVec< TVal, TSizeTy >::Add(), THashSet< TKey, THashFunc >::AddKeyV(), CalculateOverlapMtx(), TVec< TVal, TSizeTy >::Clr(), THashSet< TKey, THashFunc >::Clr(), TUNGraph::GetEdges(), THashSet< TKey, THashFunc >::GetKeyV(), GetMaxCliques(), TUNGraph::GetNodes(), TExeTm::GetStr(), TSnap::GetWccs(), TVec< TVal, TSizeTy >::Last(), and TVec< TVal, TSizeTy >::Sort().
|
static |
Definition at line 13 of file cliques.cpp.
References THashSet< TKey, THashFunc >::AddKey(), THashSet< TKey, THashFunc >::BegI(), THashSet< TKey, THashFunc >::EndI(), THashSet< TKey, THashFunc >::IsKey(), and THashSet< TKey, THashFunc >::Len().
Referenced by Expand().
|
static |
Enumerate maximal cliques of the network on more than MinMaxCliqueSize nodes.
Definition at line 217 of file cliques.cpp.
References TVec< TVal, TSizeTy >::Clr(), and GetMaximalCliques().
Referenced by GetCPMCommunities().
void TCliqueOverlap::GetMaximalCliques | ( | const PUNGraph & | G, |
int | MinMaxCliqueSize, | ||
TVec< TIntV > & | MaxCliques | ||
) |
Definition at line 108 of file cliques.cpp.
References THashSet< TKey, THashFunc >::AddKey(), TUNGraph::BegNI(), TVec< TVal, TSizeTy >::Clr(), TUNGraph::EndNI(), Expand(), TUNGraph::GetNodes(), m_G, m_maxCliques, m_minMaxCliqueSize, and m_Q.
Referenced by GetMaxCliques().
Definition at line 35 of file cliques.cpp.
References THashSet< TKey, THashFunc >::AddKey(), TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), and m_G.
Referenced by Expand().
Definition at line 41 of file cliques.cpp.
References THashSet< TKey, THashFunc >::BegI(), THashSet< TKey, THashFunc >::EndI(), TUNGraph::TNodeI::GetDeg(), TUNGraph::GetNI(), and m_G.
Referenced by Expand().
|
static |
Definition at line 177 of file cliques.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Last(), and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 194 of file cliques.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Last(), and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 6 of file cliques.cpp.
References THashSet< TKey, THashFunc >::AddKey(), THashSet< TKey, THashFunc >::BegI(), THashSet< TKey, THashFunc >::EndI(), and THashSet< TKey, THashFunc >::IsKey().
Referenced by Expand().
Definition at line 23 of file cliques.cpp.
References THashSet< TKey, THashFunc >::BegI(), THashSet< TKey, THashFunc >::EndI(), THashSet< TKey, THashFunc >::IsKey(), and THashSet< TKey, THashFunc >::Len().
Referenced by CalculateOverlapMtx().
|
private |
Definition at line 53 of file cliques.cpp.
References THashSet< TKey, THashFunc >::BegI(), THashSet< TKey, THashFunc >::EndI(), TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), THashSet< TKey, THashFunc >::IsKey(), and m_G.
Referenced by Expand().
|
private |
Definition at line 10 of file cliques.h.
Referenced by GetMaximalCliques(), GetNbrs(), GetNodeIdWithMaxDeg(), and MaxNbrsInCANDNodeId().
Definition at line 12 of file cliques.h.
Referenced by Expand(), and GetMaximalCliques().
|
private |
Definition at line 13 of file cliques.h.
Referenced by Expand(), and GetMaximalCliques().
|
private |
Definition at line 11 of file cliques.h.
Referenced by Expand(), and GetMaximalCliques().