degs_to_binary.py

NAME

degs_to_binary.py - compute the activity vectors of all the nodes of a multiplex.

SYNOPSYS

degs_to_binary.py <degree_vectors>

DESCRIPTION

Take a file which contains, on the n-th line, the degrees at each layer of the n-th node, (e.g., the result of the script node_degree_vectors.py), in the format:

  noden_deg_lay1 noden_deg_lay2 ... noden_deg_layM

and compute the corresponding node activity bit-strings, where a ”1” signals the presence of the node on that layer, while a zero indicates its absence.

OUTPUT

The program returns on stdout a list of lines, where the n-th line is the activity bit-string of the n-th node. Additionally, the program prints on stderr the distribution of all activity bit-strings, in the format:

  Bn Bit-string count

Where B is the number of ones in the activity bit-string (i.e., the node-activity associated to that activity bit-string), Bit-string is the activity bit-string and count is the number of times that particular activity bit-string appears in the multiplex.

REFERENCE

V. Nicosia, V. Latora, “Measuring and modeling correlations in multiplex networks”, Phys. Rev. E 92, 032805 (2015).

Link to paper: http://journals.aps.org/pre/abstract/10.1103/PhysRevE.92.032805