networkit.workflows

This module provides convenient workflows constructed from NetworKit functions.

networkit.workflows.batch(graphDir, match, format, function, outPath, header=None)

Read graphs from a directory, apply a function and store result in CSV format.

DEPRECATED. This function (and the networkit.workflows module) will be removed in future updates.

Parameters
  • graphDir (str) – A directory containing graph files.

  • match (str) – A pattern that must match the filename so the file is treated as a graph.

  • format (networkit.graphio.Format) – Graph file format.

  • function (networkit.base.Algorithm) – Any algorithm with a graph as input and a list/tuple of values as output.

  • outPath (str) – Path of output CSV file.

  • header (str, optional) – CSV file header. Default: None

networkit.workflows.extractLargestComponent(G)

Extract the subgraph of the largest connected component.

DEPRECATED. This function (and the networkit.workflows module) will be removed in future updates.

Parameters

G (networkit.Graph) – Input graph.

Returns

Subgraph of largest component, preserving node ids of orignal graph.

Return type

networkit.Graph