aggregate_layers_w.py

NAME

aggregate_layers_w.py - compute the (weighted) aggregated graph associated to a multiplex.

SYNOPSYS

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

DESCRIPTION

Compute and print on output the edge list of the weighted aggregated graph associated to the multiplex network given on input. An edge is present in the aggregated graph if it exists in at least one of the M layers of the multiplex.

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 the edge list of the aggregated graph associated to the multiplex network. The edge list is a list of lines in the format:

  ID1 ID2 weight

where ID1 and ID2 are the IDs of the two nodes and weight is the number of layers in which an edge between ID1 and ID2 exists.

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