node_activity.py

NAME

node_activity.py - compute the activity of the nodes of a multiplex, i.e. the number of layers where each node is not isolated.

SYNOPSYS

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

DESCRIPTION

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

Each 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

A list of lines, where the n-th line is the value of activity of the n-th node, starting from 0.

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