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
|
Classes | |
class | TCNMQMatrix |
struct | TConvertSubGraph |
struct | TConvertSubGraph< POutGraph, PInGraph, false > |
struct | TDelSelfEdges |
struct | TDelSelfEdges< PGraph, true > |
struct | TGetSubGraph |
struct | TGetSubGraph< PGraph, false > |
Functions | |
double | CalcEffDiam (const TIntFltKdV &DistNbrsCdfV, const double &Percentile=0.9) |
Helper function for computing a given Percentile of a (unnormalized) cumulative distribution function. More... | |
double | CalcEffDiam (const TFltPrV &DistNbrsCdfV, const double &Percentile=0.9) |
Helper function for computing a given Percentile of a (unnormalized) cumulative distribution function. More... | |
double | CalcEffDiamPdf (const TIntFltKdV &DistNbrsPdfV, const double &Percentile=0.9) |
Helper function for computing a given Percentile of a (unnormalized) probability distribution function. More... | |
double | CalcEffDiamPdf (const TFltPrV &DistNbrsPdfV, const double &Percentile=0.9) |
Helper function for computing a given Percentile of a (unnormalized) probability distribution function. More... | |
double | CalcAvgDiamPdf (const TIntFltKdV &DistNbrsPdfV) |
Helper function for computing the mean of a (unnormalized) probability distribution function. More... | |
double | CalcAvgDiamPdf (const TFltPrV &DistNbrsPdfV) |
Helper function for computing the mean of a (unnormalized) probability distribution function. More... | |
void | CmtyGirvanNewmanStep (PUNGraph &Graph, TIntV &Cmty1, TIntV &Cmty2) |
A single step of Girvan-Newman clustering procedure. More... | |
double | _GirvanNewmanGetModularity (const PUNGraph &G, const TIntH &OutDegH, const int &OrigEdges, TCnComV &CnComV) |
void | MapEquationNew2Modules (PUNGraph &Graph, TIntH &Module, TIntFltH &Qi, int a, int b) |
double | Equation (TIntFltH &PAlpha, double &SumPAlphaLogPAlpha, TIntFltH &Qi) |
bool | edgeIntersect (PNGraph &graph, TIntV &a, TIntV &b) |
int | vectorIntersect (TIntV &a, TIntV &b) |
bool | inComp (PNGraph &g1, PNGraph &Graph, TIntH &inCompCount, int id, int neigh) |
void | transitiveTransform (TIntV &a, TIntV &b) |
bool | chekIfCrossing (TIntV &a, TIntH &t, int f, int l, int TP) |
double | InfomapOnlineIncrement (PUNGraph &Graph, int n1, int n2, TIntFltH &PAlpha, double &SumPAlphaLogPAlpha, TIntFltH &Qi, TIntH &Module, int &Br) |
void | GetSphereDev (const int &Dim, TRnd &Rnd, TFltV &ValV) |
Sample random point from the surface of a Dim-dimensional unit sphere. More... | |
template<class PGraph > | |
TIntPr | GetRndEdgeNonAdjNode (const PGraph &Graph, int NId1, int NId2) |
Returns a random edge in a graph Graph where the edge does not touch nodes NId1 and NId2. More... | |
double | GetInvParticipRatEig (const TFltV &EigVec) |
void | GVizDoLayout (const TStr &GraphInFNm, TStr OutFNm, const TGVizLayout &Layout) |
Runs GraphViz layout engine over a graph saved in the file GraphInFNm with output saved to OutFNm. More... | |
TStr | GVizGetLayoutStr (const TGVizLayout &Layout) |
Generates the GraphViz command string based on the selected Layout engine. More... | |
double TSnap::TSnapDetail::_GirvanNewmanGetModularity | ( | const PUNGraph & | G, |
const TIntH & | OutDegH, | ||
const int & | OrigEdges, | ||
TCnComV & | CnComV | ||
) |
Definition at line 37 of file cmty.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), TUNGraph::GetNI(), TUNGraph::TNodeI::GetOutDeg(), TSnap::GetWccs(), and TVec< TVal, TSizeTy >::Len().
Referenced by TSnap::CommunityGirvanNewman().
double TSnap::TSnapDetail::CalcAvgDiamPdf | ( | const TIntFltKdV & | DistNbrsPdfV | ) |
Helper function for computing the mean of a (unnormalized) probability distribution function.
Definition at line 41 of file anf.cpp.
References TVec< TVal, TSizeTy >::Len().
Referenced by TSnap::PlotShortPathDistr().
double TSnap::TSnapDetail::CalcAvgDiamPdf | ( | const TFltPrV & | DistNbrsPdfV | ) |
Helper function for computing the mean of a (unnormalized) probability distribution function.
Definition at line 50 of file anf.cpp.
References TVec< TVal, TSizeTy >::Len().
double TSnap::TSnapDetail::CalcEffDiam | ( | const TIntFltKdV & | DistNbrsCdfV, |
const double & | Percentile | ||
) |
Helper function for computing a given Percentile of a (unnormalized) cumulative distribution function.
Definition at line 7 of file anf.cpp.
References TVec< TVal, TSizeTy >::Last(), and TVec< TVal, TSizeTy >::Len().
Referenced by CalcEffDiam(), CalcEffDiamPdf(), TSnap::GetAnfEffDiam(), TSnap::PlotHops(), and TGStat::TakeDiam().
double TSnap::TSnapDetail::CalcEffDiam | ( | const TFltPrV & | DistNbrsCdfV, |
const double & | Percentile | ||
) |
Helper function for computing a given Percentile of a (unnormalized) cumulative distribution function.
Definition at line 21 of file anf.cpp.
References TVec< TVal, TSizeTy >::Add(), CalcEffDiam(), and TVec< TVal, TSizeTy >::Len().
double TSnap::TSnapDetail::CalcEffDiamPdf | ( | const TIntFltKdV & | DistNbrsPdfV, |
const double & | Percentile | ||
) |
Helper function for computing a given Percentile of a (unnormalized) probability distribution function.
Definition at line 29 of file anf.cpp.
References CalcEffDiam(), and TGUtil::GetCdf().
Referenced by TSnap::GetBfsEffDiam(), and TSnap::PlotShortPathDistr().
double TSnap::TSnapDetail::CalcEffDiamPdf | ( | const TFltPrV & | DistNbrsPdfV, |
const double & | Percentile | ||
) |
Helper function for computing a given Percentile of a (unnormalized) probability distribution function.
Definition at line 35 of file anf.cpp.
References CalcEffDiam(), and TGUtil::GetCdf().
Definition at line 195 of file cmty.cpp.
References THash< TKey, TDat, THashFunc >::GetDat(), and TVec< TVal, TSizeTy >::Len().
A single step of Girvan-Newman clustering procedure.
Definition at line 15 of file cmty.cpp.
References TVec< TVal, TSizeTy >::Clr(), TUNGraph::DelEdge(), TBreathFS< PGraph >::DoBfs(), THash< TKey, TDat, THashFunc >::Empty(), TSnap::GetBetweennessCentr(), TBreathFS< PGraph >::GetHops(), THash< TKey, TDat, THashFunc >::GetKey(), TSnap::GetNodeWcc(), TInt::Mx, THash< TKey, TDat, THashFunc >::SortByDat(), TPair< TVal1, TVal2 >::Val1, and TPair< TVal1, TVal2 >::Val2.
Referenced by TSnap::CommunityGirvanNewman().
Definition at line 127 of file cmty.cpp.
References TNGraph::IsEdge(), and TVec< TVal, TSizeTy >::Len().
Referenced by TSnap::ReebSimplify().
double TSnap::TSnapDetail::Equation | ( | TIntFltH & | PAlpha, |
double & | SumPAlphaLogPAlpha, | ||
TIntFltH & | Qi | ||
) |
Definition at line 109 of file cmty.cpp.
References THash< TKey, TDat, THashFunc >::Len().
Referenced by TSnap::Infomap(), and InfomapOnlineIncrement().
double TSnap::TSnapDetail::GetInvParticipRatEig | ( | const TFltV & | EigVec | ) |
Definition at line 402 of file gsvd.cpp.
References TVec< TVal, TSizeTy >::Len().
Referenced by TSnap::GetInvParticipRat().
TIntPr TSnap::TSnapDetail::GetRndEdgeNonAdjNode | ( | const PGraph & | Graph, |
int | NId1, | ||
int | NId2 | ||
) |
Returns a random edge in a graph Graph where the edge does not touch nodes NId1 and NId2.
Definition at line 240 of file ggen.h.
References TRnd::GetUniDevInt(), and TInt::Rnd.
Referenced by TSnap::GenDegSeq().
Sample random point from the surface of a Dim-dimensional unit sphere.
Definition at line 346 of file ggen.cpp.
References TVec< TVal, TSizeTy >::Gen(), TRnd::GetNrmDev(), TVec< TVal, TSizeTy >::Len(), and TMath::Sqr().
Referenced by TSnap::GenGeoPrefAttach().
void TSnap::TSnapDetail::GVizDoLayout | ( | const TStr & | GraphInFNm, |
TStr | OutFNm, | ||
const TGVizLayout & | Layout | ||
) |
Runs GraphViz layout engine over a graph saved in the file GraphInFNm with output saved to OutFNm.
Definition at line 5 of file gviz.cpp.
References TStr::CStr(), TStr::Fmt(), TStr::GetFExt(), GVizGetLayoutStr(), and IAssert.
Referenced by TSnap::DrawGViz(), TGraphKey::DrawGViz(), TGHash< TDat >::DrawGViz(), and TAGMUtil::GVizComGraph().
TStr TSnap::TSnapDetail::GVizGetLayoutStr | ( | const TGVizLayout & | Layout | ) |
Generates the GraphViz command string based on the selected Layout engine.
Definition at line 30 of file gviz.cpp.
References Fail, TStr::GetNullStr(), gvlCirco, gvlDot, gvlNeato, gvlSfdp, and gvlTwopi.
Referenced by GVizDoLayout().
bool TSnap::TSnapDetail::inComp | ( | PNGraph & | g1, |
PNGraph & | Graph, | ||
TIntH & | inCompCount, | ||
int | id, | ||
int | neigh | ||
) |
Definition at line 150 of file cmty.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), THash< TKey, TDat, THashFunc >::GetDat(), TNGraph::TNodeI::GetDeg(), TNGraph::GetNI(), THash< TKey, TDat, THashFunc >::IsKey(), and TNGraph::IsNode().
double TSnap::TSnapDetail::InfomapOnlineIncrement | ( | PUNGraph & | Graph, |
int | n1, | ||
int | n2, | ||
TIntFltH & | PAlpha, | ||
double & | SumPAlphaLogPAlpha, | ||
TIntFltH & | Qi, | ||
TIntH & | Module, | ||
int & | Br | ||
) |
Definition at line 214 of file cmty.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), TUNGraph::AddEdge(), TUNGraph::AddNode(), Equation(), THash< TKey, TDat, THashFunc >::GetDat(), TUNGraph::TNodeI::GetDeg(), TUNGraph::GetEdges(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), TUNGraph::IsNode(), and MapEquationNew2Modules().
Referenced by TSnap::InfomapOnline().
void TSnap::TSnapDetail::MapEquationNew2Modules | ( | PUNGraph & | Graph, |
TIntH & | Module, | ||
TIntFltH & | Qi, | ||
int | a, | ||
int | b | ||
) |
Definition at line 54 of file cmty.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), TUNGraph::BegNI(), TUNGraph::EndNI(), THash< TKey, TDat, THashFunc >::GetDat(), TUNGraph::TNodeI::GetDeg(), TUNGraph::TNodeI::GetId(), TUNGraph::TNodeI::GetNbrNId(), TUNGraph::GetNI(), THash< TKey, TDat, THashFunc >::IsKey(), and TVec< TVal, TSizeTy >::Len().
Referenced by TSnap::Infomap(), and InfomapOnlineIncrement().
Definition at line 179 of file cmty.cpp.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Len().
Definition at line 138 of file cmty.cpp.
References TVec< TVal, TSizeTy >::Len().
Referenced by TSnap::ReebRefine().