Start a BFS from source node, return node-induced subgraph of the first k nodes discovered.
DEPRECATED. This function (and the networkit.sampling module) will be removed in future updates.
G (networkit.Graph) – The input graph.
source (int, optional) – The starting node. If none is choosen, then a random node is picked. Default: None
k (int, optional) – Stop after k nodes are discovered. Default: 50
Subgraph based on bfsSample.
networkit.Graph