Graph Library Functions

Degrees degrees(const G& g) returns array of node degrees return as the following structure:

struct Degrees
  array<unsigned> in_degree, out_degree;

+void ErdosRenyi_generate(Graph& g, unsigned nodes, unsigned links, urand& uni);+

Generate an Erdös-Rényi random graph with given nodes and links. Links are attached randomly to the nodes, drawn from uni.

+PreferentialAttach_generate(Graph& g, unsigned nodes, urand& uni, random_gen& indegree_dist=default_indegree)+

Barabasi-Albert Preferential attachment algorithm. For each node, an indegree value is drawn from indegree_dist (defaults to a constant value of 1). This many links are then preferentially attached to other nodes, according to their outdegree.