multiplexity.py

NAME

multiplexity.py - compute the pairwise multiplexity between all the pairs of layers of a multiplex.

SYNOPSYS

multiplexity.py <layer1> <layer2> [<layer3>...]

DESCRIPTION

Compute and print on output the pairwise multiplexity Qα,β (i.e., the fraction of nodes active on both layers) between all pairs of layers. 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, in the format:

  layer1 layer2 mult

where layer1 and layer2 are the IDs of the layers, and mult is the value of the multiplexity Qlayer1,layer2. Layers IDs start from zero, are are associated to the layers in the same order in which the layer files are provided on the command line.

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