Quickly obtain complement of Graph

Is there a quick way to get the complement of every graph in a batch?

What do you mean by complement?

The complement of a graph being a new graph with the same vertices such that vertices (u,v) are only connected in the complement of the graph if and only if they are unconnected in the original graph.

Hi, there is a piece of example of code for generating complement graph in our quick start tutorial: Link Prediction using Graph Neural Networks — DGL 0.6.1 documentation . Note that this only works for very small graphs because it requires a dense adj matrix.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.