layer_activity_vectors.py

NAME

layer_activity_vectors.py - compute the activity vectors of all the layers of a multiplex.

SYNOPSYS

layer_activity_vectors.py <layer1> [<layer2> ...]

DESCRIPTION

Compute and print on output the activity vectors of the layers of a multiplex network, where the layers are given as input in the files layer1, layer2, etc.

Each input file contains the (undirected) edge list of a layer, and each line is in the format:

  src_ID dest_ID

where src_ID and dest_ID are the IDs of the two endpoints of an edge.

OUTPUT

The program prints on stdout a list of lines, where the n-th line contains the activity vector of the n-th layer, i.e. a bit-string where each bit is set to “1” if the corresponding node is active on the n-th layer, and to “0” otherwise.

As usual, node IDs start from zero and proceed sequentially, without gaps, i.e., if a node ID is not present in any of the layer files given as input, the program considers it as being isolated on all the layers.

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