pygmtools.utils.generate_isomorphic_graphs

pygmtools.utils.generate_isomorphic_graphs(node_num, graph_num=2, node_feat_dim=0, backend=None)[source]

Generate a set of isomorphic graphs, for testing purposes and examples.

Parameters
  • node_num – number of nodes in each graph

  • graph_num – (default: 2) number of graphs

  • node_feat_dim – (default: 0) number of node feature dimensions

  • backend – (default: pygmtools.BACKEND variable) the backend for computation.

Returns

if graph_num==2, this function returns \((m\times n \times n)\) the adjacency matrix, and \((n \times n)\) the permutation matrix;

else, this function returns \((m\times n \times n)\) the adjacency matrix, and \((m\times m\times n \times n)\) the multi-matching permutation matrix