dgl.transform.line_graph

dgl.transform.line_graph(g, backtracking=True, shared=False)[source]

Return the line graph of this graph.

Parameters:
  • g (dgl.DGLGraph) – The input graph.
  • backtracking (bool, optional) – Whether the returned line graph is backtracking.
  • shared (bool, optional) – Whether the returned line graph shares representations with self.
Returns:

The line graph of this graph.

Return type:

DGLGraph