1. hv_net(1)
  2. www.complex-networks.net
  3. hv_net(1)


hv_net - Sample a random graph with an assigned joint degree distribution


hv_net graph_in [SHOW]


hv_net samples a random graph whose joint degree distribution is equal to that of another graph provided as input, using the hidden-variable model proposed by Boguna ans Pastor-Satorras.



File containing the edge list of the existing graph. If equal to '-' (dash), read the edge list from STDIN.


If the second parameter is equal to SHOW, the program prints on STDERR the hidden variable and actual degree of each node.


Let us assume that we want to create a graph whose joint degree distribution is equal to that of the graph contained in AS-20010316.net (i.e., the graph of the Internet at the AS level in March 2001). We can use the command:

    $ hv_net AS-20010316.net > AS-20010316.net_rand

which will sample a random graph with the same joint-degree distribution and will save its edge list in the file AS-20010316.net_rand (notice the STDOUT redirection operator >). Additionally, we can also save the values of the hidden variables and actual degrees of the nodes by specifying SHOW as a second parameter:

    $ hv_net AS-20010316.net SHOW > AS-20010316.net_rand 2>AS-20010316.net_rand_hv 

In this case, the file AS-20010316.net_rand_hv will contain the values of the hidden variable of each node and of the actual degree of the node in the sampled graph, in the format:

     h1 k1
     h2 k2


conf_model_deg(1), conf_model_deg_nocheck(1)



(c) Vincenzo 'KatolaZ' Nicosia 2009-2017 <v.nicosia@qmul.ac.uk>.

  1. www.complex-networks.net
  2. September 2017
  3. hv_net(1)