node_activity_vectors.py

NAME

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

SYNOPSYS

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

DESCRIPTION

Compute and print on output the activity vectors of the nodes of a multiplex network, whose 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 node, i.e. a bit-string where each bit is set to “1” if the node is active on the corresponding 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, and will print on output a bit-string of zeros.

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