All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BarabasiAlbertGenerator.h
Go to the documentation of this file.
1 /*
2  * BarabasiAlbertGenerator.h
3  *
4  * Created on: May 28, 2013
5  * Author: forigem
6  */
7 
8 #ifndef BarabasiAlbertGenerator_H_
9 #define BarabasiAlbertGenerator_H_
10 
11 #include "StaticGraphGenerator.h"
12 
13 namespace NetworKit {
14 
20 private:
21  Graph initGraph;
22  count k;
23  count nMax;
24  count n0;
25  bool batagelj;
26 
33  Graph generateBatagelj();
34 
35  Graph generateOriginal();
36 
37 public:
39 
53  BarabasiAlbertGenerator(count k, count nMax, count n0 = 0, bool batagelj=true);
54 
55  BarabasiAlbertGenerator(count k, count nMax, const Graph& initGraph, bool batagelj=true);
56 
57  Graph generate() override;
58 };
59 
60 } /* namespace NetworKit */
61 #endif /* BarabasiAlbertGenerator_H_ */
Abstract base class for static graph generators.
Definition: StaticGraphGenerator.h:19
Generates a scale-free graph using the Barabasi-Albert preferential attachment model.
Definition: BarabasiAlbertGenerator.h:19
BarabasiAlbertGenerator()
Definition: BarabasiAlbertGenerator.cpp:17
Graph generate() override
Definition: BarabasiAlbertGenerator.cpp:52
uint64_t count
Definition: Globals.h:21
A graph (with optional weights) and parallel iterator methods.
Definition: Graph.h:79