g++ -I graphgen graphgen/graph.o graphgen/estimate.o -o program program.cpp
using the GNU C++ compiler. A Makefile is provided to compile example programs and library object files.
The biggest graph set available contains graphs with fixed number of vertices but variable number of links, it is named the grandcanonical. A subset, canonical, contains graphs with fixed numbers of vertices and links. Another subset also has constant numbers of vertices and links and also fixes the degree sequence (i.e. which degrees must be present how often in a graph).
Through template parameters the ensemble classes are further specialized. The first template parameter is the type to be used as weight calculation class. The second parameter is used for restricting the updates proposed for Metropolis sampling. For example
link_weight<value_type::logweight> weight(f); undirected_graph graph(1000,2000); canonical<link_weight<logweight>, shape::simple> E(graph,weight); E.update();
creates graph, weight and an ensemble object restricted to simple graphs, using a logarithmic per-link degree weight to calculate acceptance probabilities. The graph is initialized with 1000 sites and 200 links, the weight with some function f to compute values and the ensemble ties it all together. Finally a local graph update is done.
Calculation of quantities can be done in two ways - create and manage histograms yourself and use function calls to accumulate data to them. Provided functions include estimation of degree distributions, distance distributions, clustering, degree-degree correlations, average neighbor degrees, assortativity. Another way are classes encapsulating the accumulating functions, managing histograms, normalization and output.
Sampling of growing graph ensembles is also possible using graph generator functions. Currently these are integrated into the central graph class but should be supplemented by generator classes outside.