networkit.components.
ConnectedComponents
Bases: object
Determines the connected components and associated values for an undirected graph.
ConnectedComponents(G)
Create ConnectedComponents for Graph G.
componentOfNode
(self, v)Get the the component in which node v is situated.
getComponentSizes
(self)getPartition
(self)Get a Partition that represents the components.
numberOfComponents
(self)Get the number of connected components.
run
(self)This method determines the connected components for the graph given in the constructor.
networkit.components.
DynConnectedComponents
Bases: object
Determines and updates the connected components of an undirected graph.
componentOfNode
(self, v)Returns the the component in which node @a u is.
getComponentSizes
(self)Returns the map from component to size.
Returns map[index, count]
A map that maps each component to its size.
getComponents
(self)Returns all the components, each stored as (unordered) set of nodes.
Returns vector[vector[node]]
A vector of vectors. Each inner vector contains all the nodes inside the component.
numberOfComponents
(self)Returns the number of components.
Returns count
The number of components.
run
(self)update
(self, event)Updates the connected components after an edge insertion or deletion.
updateBatch
(self, batch)Updates the connected components after a batch of edge insertions or deletions.
networkit.components.
ParallelConnectedComponents
Bases: object
Determines the connected components and associated values for an undirected graph.
componentOfNode
(self, v)getPartition
(self)numberOfComponents
(self)run
(self)networkit.components.
StronglyConnectedComponents
Bases: object
Determines the connected components and associated values for a directed graph.
By default, the iterative implementation is used. If edges on the graph have been removed, you should switch to the recursive implementation.
componentOfNode
(self, v)getPartition
(self)numberOfComponents
(self)run
(self)runIteratively
(self)runRecursively
(self)networkit.components.
WeaklyConnectedComponents
Bases: object
Determines the weakly connected components of a directed graph.
componentOfNode
(self, v)Returns the the component in which node @a u is.
getComponentSizes
(self)Returns the map from component to size.
Returns map[index, count]
A map that maps each component to its size.
getComponents
(self)Returns all the components, each stored as (unordered) set of nodes.
Returns vector[vector[node]]
A vector of vectors. Each inner vector contains all the nodes inside the component.
numberOfComponents
(self)Returns the number of components.
Returns count
The number of components.
run
(self)