All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::BarabasiAlbertGenerator Class Reference

Generates a scale-free graph using the Barabasi-Albert preferential attachment model. More...

#include <BarabasiAlbertGenerator.h>

Public Member Functions

 BarabasiAlbertGenerator ()
 
 BarabasiAlbertGenerator (count k, count nMax, count n0=0, bool batagelj=true)
 This generator implements the preferential attachment model as introduced by Barabasi and Albert[1]. More...
 
 BarabasiAlbertGenerator (count k, count nMax, const Graph &initGraph, bool batagelj=true)
 
Graph generate () override
 
- Public Member Functions inherited from NetworKit::StaticGraphGenerator
virtual ~StaticGraphGenerator ()=default
 Default destructor. More...
 

Detailed Description

Generates a scale-free graph using the Barabasi-Albert preferential attachment model.

Constructor & Destructor Documentation

NetworKit::BarabasiAlbertGenerator::BarabasiAlbertGenerator ( )
NetworKit::BarabasiAlbertGenerator::BarabasiAlbertGenerator ( count  k,
count  nMax,
count  n0 = 0,
bool  batagelj = true 
)

This generator implements the preferential attachment model as introduced by Barabasi and Albert[1].

The original algorithm is very slow and thus, the much faster method from Batagelj and Brandes[2] is implemented and the current default. The original method can be chosen by setting batagelj to false. [1] Barabasi, Albert: Emergence of Scaling in Random Networks http://arxiv.org/pdf/cond-mat/9910332.pdf [2] ALG 5 of Batagelj, Brandes: Efficient Generation of Large Random Networks https://kops.uni-konstanz.de/bitstream/handle/123456789/5799/random.pdf?sequence=1

Parameters
kNumber of attachments per node
nMaxMaximum number of nodes in the graph
n0Number of connected nodes to begin with
batageljSpecifies whether to use batagelj's method or the original one; default: true
NetworKit::BarabasiAlbertGenerator::BarabasiAlbertGenerator ( count  k,
count  nMax,
const Graph initGraph,
bool  batagelj = true 
)

Member Function Documentation

Graph NetworKit::BarabasiAlbertGenerator::generate ( )
overridevirtual

The documentation for this class was generated from the following files: