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 <ff.h>
Public Types | |
enum | TStopReason { srUndef, srOk, srFlood, srTimeLimit } |
Public Member Functions | |
TFfGGen (const bool &BurnExpFireP, const int &StartNNodes, const double &ForwBurnProb, const double &BackBurnProb, const double &DecayProb, const double &Take2AmbasPrb, const double &OrphanPrb) | |
PNGraph | GetGraph () const |
void | SetGraph (const PNGraph &NGraph) |
void | Clr () |
TStr | GetParamStr () const |
TStopReason | AddNodes (const int &GraphNodes, const bool &FloodStop=true) |
TStopReason | GenGraph (const int &GraphNodes, const bool &FloodStop=true) |
TStopReason | GenGraph (const int &GraphNodes, PGStatVec &EvolStat, const bool &FloodStop=true) |
void | PlotFireSize (const TStr &FNmPref, const TStr &DescStr) |
Static Public Member Functions | |
static void | GenFFGraphs (const double &FProb, const double &BProb, const TStr &FNm) |
Static Public Attributes | |
static int | TimeLimitSec = 30*60 |
Private Attributes | |
PNGraph | Graph |
TBool | BurnExpFire |
TInt | StartNodes |
TFlt | FwdBurnProb |
TFlt | BckBurnProb |
TFlt | ProbDecay |
TFlt | Take2AmbProb |
TFlt | OrphanProb |
Forest Fire Graph Generator. For more details is "Graph Evolution: Densification and Shrinking Diameters" by J. Leskovec, J. Kleinberg, C. Faloutsos. ACM Transactions on Knowledge Discovery from Data (TKDD), 1(1), 2007.
enum TFfGGen::TStopReason |
TFfGGen::TFfGGen | ( | const bool & | BurnExpFireP, |
const int & | StartNNodes, | ||
const double & | ForwBurnProb, | ||
const double & | BackBurnProb, | ||
const double & | DecayProb, | ||
const double & | Take2AmbasPrb, | ||
const double & | OrphanPrb | ||
) |
Definition at line 260 of file ff.cpp.
TFfGGen::TStopReason TFfGGen::AddNodes | ( | const int & | GraphNodes, |
const bool & | FloodStop = true |
||
) |
Definition at line 272 of file ff.cpp.
References TNGraph::AddEdge(), TNGraph::AddNode(), BckBurnProb, TForestFire::BurnExpFire(), BurnExpFire, TForestFire::BurnGeoFire(), TPt< TRec >::Empty(), FwdBurnProb, TForestFire::GetBurned(), TForestFire::GetBurnedNId(), TNGraph::GetEdges(), TNGraph::GetNodes(), TExeTm::GetSecs(), TExeTm::GetStr(), TRnd::GetUniDev(), TRnd::GetUniDevInt(), TVec< TInt >::GetV(), Graph, IAssert, TForestFire::Infect(), Kilo, TPt< TRec >::New(), OrphanProb, ProbDecay, srFlood, srOk, srTimeLimit, StartNodes, Take2AmbProb, and TimeLimitSec.
Referenced by GenGraph().
|
inline |
Definition at line 66 of file ff.h.
References TNGraph::Clr().
|
static |
Definition at line 358 of file ff.cpp.
References TVec< TVal, TSizeTy >::Add(), TGStat::AllStat(), TStr::Fmt(), GenGraph(), gsvNodes, IAssert, TVec< TVal, TSizeTy >::Len(), TGStat::NDiamRuns, TGStatVec::New(), and tmuNodes.
TFfGGen::TStopReason TFfGGen::GenGraph | ( | const int & | GraphNodes, |
const bool & | FloodStop = true |
||
) |
Definition at line 327 of file ff.cpp.
References AddNodes(), Graph, and TPt< TRec >::New().
Referenced by GenFFGraphs(), TForestFire::GenGraph(), and main().
TFfGGen::TStopReason TFfGGen::GenGraph | ( | const int & | GraphNodes, |
PGStatVec & | EvolStat, | ||
const bool & | FloodStop = true |
||
) |
Definition at line 332 of file ff.cpp.
References AddNodes(), TNGraph::GetNodes(), Graph, TPt< TRec >::New(), srOk, srUndef, and StartNodes.
|
inline |
Definition at line 64 of file ff.h.
References Graph.
Referenced by TForestFire::GenGraph(), and main().
TStr TFfGGen::GetParamStr | ( | ) | const |
Definition at line 267 of file ff.cpp.
References BckBurnProb, BurnExpFire, TStr::Fmt(), FwdBurnProb, OrphanProb, ProbDecay, StartNodes, and Take2AmbProb.
Definition at line 346 of file ff.cpp.
References TVec< TVal, TSizeTy >::Add(), TGnuPlot::AddPlot(), TNGraph::BegNI(), TStr::CStr(), TNGraph::EndNI(), TStr::Fmt(), TNGraph::GetEdges(), TNGraph::GetNodes(), gpwImpulses, Graph, TGnuPlot::SavePng(), TGnuPlot::SetXYLabel(), and TVec< TVal, TSizeTy >::Sort().
|
private |
Definition at line 58 of file ff.h.
Referenced by AddNodes(), and GetParamStr().
|
private |
Definition at line 56 of file ff.h.
Referenced by AddNodes(), and GetParamStr().
|
private |
Definition at line 58 of file ff.h.
Referenced by AddNodes(), and GetParamStr().
|
private |
Definition at line 54 of file ff.h.
Referenced by AddNodes(), GenGraph(), GetGraph(), and PlotFireSize().
|
private |
Definition at line 59 of file ff.h.
Referenced by AddNodes(), and GetParamStr().
|
private |
Definition at line 58 of file ff.h.
Referenced by AddNodes(), and GetParamStr().
|
private |
Definition at line 57 of file ff.h.
Referenced by AddNodes(), GenGraph(), and GetParamStr().
|
private |
Definition at line 59 of file ff.h.
Referenced by AddNodes(), and GetParamStr().
|
static |
Definition at line 52 of file ff.h.
Referenced by AddNodes().