Random Barabási–Albert network#
- random_barabasi_albert_graph[vert_type]( n: int, p: float, random_state) -> undirected_network[vert_type]
-
template<integer_network_vertex VertT, std::uniform_random_bit_generator Gen>
undirected_network<VertT> random_barabasi_albert_graph(VertT n, VertT m, Gen &generator)#
Generates a random Barabási–Albert network
[3] of size n
, vertices are added
one-by-one and each vertex is connected to m
random existing vertices.
The parameter m
needs to be smaller than n
and larger than or
equal to 1, otherwise the function fails by raising a ValueError
exception
in Python or a std::invalid_argument
exception in C++.