networkit.nxadapter

This module handles compatibility between NetworKit and NetworkX

networkit.nxadapter.nk2nx(nkG)

Convert a networKit.Graph to a networkx.Graph.

Parameters:

nkG (networkit.Graph) – The input NetworKit graph.

networkit.nxadapter.nx2nk(nxG, weightAttr=None)

Convert a networkx.Graph to a networkit.Graph.

Parameters:
  • nxG (networkx.Graph) – The input networkx graph.

  • weightAttr (str, optional) – The edge attribute which should be treated as the edge weight. Default: None