Bases: Algorithm
Determines the biconnected components of an undirected graph as defined in Tarjan, Robert. Depth-First Search and Linear Graph Algorithms. SIAM J. Comput. Vol 1, No. 2, June 1972.
G (networkit.Graph) – The input graph.
Returns the map from component id to size.
dict(int – A dict that maps each component id to its size.
int)
Returns all the components, each stored as (unordered) set of nodes.
A vector of vectors. Each inner vector contains all the nodes inside the component.
vector[vector[node]]
Get the components that contain node u.
u (int) – The node.
Components that contain node u.
set
Returns the number of components.
The number of components.
int
Bases: Algorithm
Get the the component in which node v is situated.
v (int) – The node whose component is asked for.
Component in which node v is situated.
int
Get the component sizes.
A dict containing the component ids and their size.
dict(int :
int)
Get the connected components, each as a list of nodes.
The connected components.
list(int)
Get a Partition that represents the components.
A partition representing the found components.
networkit.Partition
Get the number of connected components.
The number of connected components.
int
Bases: ComponentDecomposition
Determines the connected components and associated values for an undirected graph. Create ConnectedComponents for Graph G.
G (networkit.Graph) – The graph.
Constructs a new graph that contains only the nodes inside the largest connected component.
Notes
Available for undirected graphs only.
G (networkit.Graph) – The input graph.
compactGraph (bool, optional) – If true, the node ids of the output graph will be compacted (i.e., re-numbered from 0 to n-1). If false, the node ids will not be changed. Default: False
A graph that contains only the nodes inside the largest connected component.
networkit.Graph
Bases: ComponentDecomposition
, DynAlgorithm
Determines and updates the connected components of an undirected graph.
G (networkit.Graph) – The input graph.
Bases: ComponentDecomposition
, DynAlgorithm
Determines and updates the weakly connected components of a directed graph.
G (networkit.Graph) – The input graph.
Bases: ComponentDecomposition
Determines the connected components and associated values for an undirected graph.
G (networkit.Graph) – The input graph
coarsening (bool, optional) – Specifies whether the main algorithm based on label propagation (LP) shall work recursively (true) or not (false) by coarsening/contracting an LP-computed clustering. Defaults to true since we saw positive effects in terms of running time for many networks. Beware of possible memory implications. Default: True
Bases: ComponentDecomposition
Computes the strongly connected components of a directed graph.
Bases: ComponentDecomposition
Determines the weakly connected components of a directed graph.
G (networkit.Graph) – The graph.