graph_analysis
UniformRandomVertexRemoval.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_PERCOLATION_STRATEGIES_UNIFORM_RANDOM_VERTEX_REMOVAL
2 #define GRAPH_ANALYSIS_PERCOLATION_STRATEGIES_UNIFORM_RANDOM_VERTEX_REMOVAL
3 
4 #include "../Strategy.hpp"
5 
6 namespace graph_analysis {
7 namespace percolation {
8  class RandomNumberGenerator;
9 
10 namespace strategies {
11 
13 {
14  std::vector<Vertex::Ptr> mDisabled;
15  double mOccupationProbability;
16  RandomNumberGenerator* mpRandomNumberGenerator;
17 
18 public:
19  UniformRandomVertexRemoval(double occupationProbability, uint32_t seed = 0);
20 
21  EventList apply(SubGraph::Ptr subgraph);
22 
23  std::vector<Vertex::Ptr> getDisabledVertices() const { return mDisabled; }
24 };
25 
26 } // end namespace strategies
27 } // end namespace percolation
28 } // end namespace graph_analysis
29 #endif // GRAPH_ANALYSIS_PERCOLATION_STRATEGIES_UNIFORM_RANDOM_VERTEX_REMOVAL
std::vector< Vertex::Ptr > getDisabledVertices() const
Definition: UniformRandomVertexRemoval.hpp:23
UniformRandomVertexRemoval(double occupationProbability, uint32_t seed=0)
Definition: UniformRandomVertexRemoval.cpp:8
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
Definition: Strategy.hpp:11
Percolation deals with a changing graph, i.e., nodes and edges that disappear from the graph...
shared_ptr< SubGraph > Ptr
Definition: SubGraph.hpp:52
Definition: RandomNumberGenerator.hpp:14
std::vector< Event > EventList
Definition: Event.hpp:23
EventList apply(SubGraph::Ptr subgraph)
Definition: UniformRandomVertexRemoval.cpp:14
Definition: UniformRandomVertexRemoval.hpp:12