pymnet.get_isomorphism

pymnet.get_isomorphism(net1, net2, allowed_aspects='all', include_fixed=False, backend='auto')

Returns an isomorphism between net1 and net2 if possible.

Parameters:
net1MultilayerNetwork

The first multilayer network.

net2MultilayerNetwork

The second multilayer network.

allowed_aspectslist of ints, string

The aspects that can be permuted in this isomorphism type. Nodes are in aspect 0 by convention. Value “all” will allow all permutations, i.e., it gives the (nonpartial) node-layer isomorphism.

include_fixedbool

If True the elementary layer permutations include elements that remain unchanged.

backendstring

The program to be used for solving the graph isomorphism of the auxiliary graphs. Value “auto” will select the best available candidate. For a list of backends, see documentation of the package.

Returns:
automorphism_generatorslists of dicts, None

A permutation of the first multilayer network that gives the second network. A permutation of a multilayer network is a list of permutations, one for each aspect. Permutation for an aspect is a dictionary where each key is mapped to the value. If include_fixed is not set true, the dictionaries do not contain elementary layers that would be mapped to themselves. If the two networks are not isomorphic, None is returned instead.

References

“Isomorphisms in Multilayer Networks”, M. Kivela & M. A. Porter, arXiv:1506.00508 [physics.soc-ph]