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
graph_analysis::percolation::strategies::UniformRandomVertexRemoval::UniformRandomVertexRemoval
UniformRandomVertexRemoval(double occupationProbability, uint32_t seed=0)
Definition: UniformRandomVertexRemoval.cpp:8
graph_analysis::percolation::EventList
std::vector< Event > EventList
Definition: Event.hpp:23
graph_analysis::percolation::Strategy
Definition: Strategy.hpp:11
graph_analysis
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
graph_analysis::percolation::strategies::UniformRandomVertexRemoval
Definition: UniformRandomVertexRemoval.hpp:12
graph_analysis::percolation::RandomNumberGenerator
Definition: RandomNumberGenerator.hpp:14
percolation
Percolation deals with a changing graph, i.e., nodes and edges that disappear from the graph.
graph_analysis::percolation::strategies::UniformRandomVertexRemoval::apply
EventList apply(SubGraph::Ptr subgraph)
Definition: UniformRandomVertexRemoval.cpp:14
graph_analysis::percolation::strategies::UniformRandomVertexRemoval::getDisabledVertices
std::vector< Vertex::Ptr > getDisabledVertices() const
Definition: UniformRandomVertexRemoval.hpp:23
graph_analysis::SubGraph::Ptr
shared_ptr< SubGraph > Ptr
Definition: SubGraph.hpp:52