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
|
Simulates a single Forest Fire on a undirected graph starting for a given starting node (does not densify!). More...
#include <ff.h>
Public Member Functions | |
TUndirFFire (const double &_BurnProb=0.3) | |
void | SetGraph (const PUNGraph &GraphPt) |
PUNGraph | GetGraph () const |
int | GetNBurned () const |
int | GetBurnedNId (const int &n) const |
int | BurnGeoFire (const int &StartNId) |
TFfGGen::TStopReason | AddNodes (const int &GraphNodes, const bool &FloodStop=true) |
Private Attributes | |
TRnd | Rnd |
PUNGraph | Graph |
double | BurnProb |
TIntSet | BurnedSet |
TIntV | BurningNIdV |
TIntV | NewBurnedNIdV |
TIntV | AliveNIdV |
Simulates a single Forest Fire on a undirected graph starting for a given starting node (does not densify!).
|
inline |
Definition at line 140 of file ff.h.
TFfGGen::TStopReason TUndirFFire::AddNodes | ( | const int & | GraphNodes, |
const bool & | FloodStop = true |
||
) |
Definition at line 784 of file ff.cpp.
References TVec< TVal, TSizeTy >::Add(), TUNGraph::AddEdge(), TUNGraph::AddNode(), BurnGeoFire(), BurnProb, TPt< TRec >::Empty(), GetBurnedNId(), TUNGraph::GetEdges(), TUNGraph::GetNodes(), TRnd::GetUniDevInt(), Graph, IAssert, Kilo, TPt< TRec >::New(), Rnd, TFfGGen::srFlood, and TFfGGen::srOk.
int TUndirFFire::BurnGeoFire | ( | const int & | StartNId | ) |
Definition at line 745 of file ff.cpp.
References TVec< TVal, TSizeTy >::Add(), THashSet< TKey, THashFunc >::AddKey(), AliveNIdV, BurnedSet, BurningNIdV, BurnProb, TVec< TVal, TSizeTy >::Clr(), THashSet< TKey, THashFunc >::Clr(), TVec< TVal, TSizeTy >::Empty(), TRnd::GetGeoDev(), TUNGraph::GetNI(), TUNGraph::TNodeI::GetOutDeg(), TUNGraph::TNodeI::GetOutNId(), Graph, IAssert, THashSet< TKey, THashFunc >::IsKey(), TVec< TVal, TSizeTy >::Len(), THashSet< TKey, THashFunc >::Len(), TMath::Mn(), NewBurnedNIdV, Rnd, TVec< TVal, TSizeTy >::Shuffle(), and TVec< TVal, TSizeTy >::Swap().
Referenced by AddNodes().
|
inline |
Definition at line 144 of file ff.h.
Referenced by AddNodes().
|
inline |
|
inline |
Definition at line 143 of file ff.h.
References THashSet< TKey, THashFunc >::Len().
|
private |
Definition at line 138 of file ff.h.
Referenced by BurnGeoFire().
|
private |
Definition at line 137 of file ff.h.
Referenced by BurnGeoFire().
|
private |
Definition at line 138 of file ff.h.
Referenced by BurnGeoFire().
|
private |
Definition at line 136 of file ff.h.
Referenced by AddNodes(), and BurnGeoFire().
|
private |
Definition at line 135 of file ff.h.
Referenced by AddNodes(), BurnGeoFire(), and GetGraph().
|
private |
Definition at line 138 of file ff.h.
Referenced by BurnGeoFire().
|
private |
Definition at line 134 of file ff.h.
Referenced by AddNodes(), and BurnGeoFire().