Defined in <
template<typename GraphView> GraphView make_barabasi_albert(const std::size_t n,const std::size_t d,bool add_reverse_edge)
Generate a scale-free network based on the Barabasi-Albert preferential attachment model.
This implementation is based on the following paper:
Vertices with lower vertex IDs are more likely to be the target for edges. Note that if add_reverse_edge is false, the outgoing edge distribution is constant, as each vertex will have exactly 'd' edges.
The returned view owns its underlying container.
- n: Number of vertices in the generated graph.
- d: The number of outgoing edges to generate for each vertex
A view over the generated graph.
using view_type = stapl::graph_view<stapl::multidigraph<int>>; auto v = stapl::generators::make_binary_tree<view_type>(256);