1 #ifndef GRAPH_ANALYSIS_PERCOLATION_STRATEGIES_RANDOM_DRAW_HPP 2 #define GRAPH_ANALYSIS_PERCOLATION_STRATEGIES_RANDOM_DRAW_HPP 6 #include "../../GraphElement.hpp" 10 class RandomNumberGenerator;
12 namespace strategies {
24 std::map<GraphElementId, double> mProbabilityDensity;
29 mutable double mProbabilityDensitySum;
75 #endif // GRAPH_ANALYSIS_PERCOLATION_STRATEGIES_RANDOM_DRAW_HPP uint32_t GraphElementId
Definition: GraphElement.hpp:21
~RandomDraw()
Definition: RandomDraw.cpp:19
double getProbabilityDensitySum() const
Definition: RandomDraw.cpp:30
Randomly draws items from a given set, based on given probability densities. Uses RandomNumberGenerat...
Definition: RandomDraw.hpp:21
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
Percolation deals with a changing graph, i.e., nodes and edges that disappear from the graph...
GraphElementId drawItem() const
Definition: RandomDraw.cpp:83
double getProbability(GraphElementId id) const
Definition: RandomDraw.cpp:46
void setProbabilityDensity(GraphElementId id, double density)
Definition: RandomDraw.cpp:24
Definition: RandomNumberGenerator.hpp:14
void removeItem(GraphElementId id)
Definition: RandomDraw.cpp:68
RandomDraw(uint32_t seed=0)
Definition: RandomDraw.cpp:12