All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::DynWeaklyConnectedComponents Class Reference

Determines and updates the weakly connected components of a directed graph. More...

#include <DynWeaklyConnectedComponents.h>

Public Member Functions

 DynWeaklyConnectedComponents (const Graph &G)
 Create DynWeaklyConnectedComponents class for Graph G. More...
 
void run () override
 This method determines the weakly connected components for the graph given in the constructor. More...
 
void update (GraphEvent event) override
 Updates the weakly connected components after an edge insertion or deletion. More...
 
void updateBatch (const std::vector< GraphEvent > &batch) override
 Updates the weakly connected components after a batch of edge events (insertions or deletions). More...
 
count numberOfComponents ()
 Get the number of weakly connected components. More...
 
count componentOfNode (node u)
 Get the the component in which node u is. More...
 
std::map< index, countgetComponentSizes ()
 
std::vector< std::vector< node > > getComponents ()
 
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
 
virtual ~Algorithm ()=default
 Virtual default destructor. More...
 
bool hasFinished () const
 Indicates whether an algorithm has completed computation or not. More...
 
void assureFinished () const
 Assure that the algorithm has been run, throws a std::runtime_error otherwise. More...
 
virtual std::string toString () const
 Returns a string with the algorithm's name and its parameters, if there are any. More...
 
virtual bool isParallel () const
 
- Public Member Functions inherited from NetworKit::DynAlgorithm
virtual ~DynAlgorithm ()=default
 Virtual default destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...
 

Detailed Description

Determines and updates the weakly connected components of a directed graph.

Constructor & Destructor Documentation

NetworKit::DynWeaklyConnectedComponents::DynWeaklyConnectedComponents ( const Graph G)

Create DynWeaklyConnectedComponents class for Graph G.

Parameters
GThe graph.

Member Function Documentation

count NetworKit::DynWeaklyConnectedComponents::componentOfNode ( node  u)
inline

Get the the component in which node u is.

Parameters
[in]uThe node.
std::vector< std::vector< node > > NetworKit::DynWeaklyConnectedComponents::getComponents ( )
Returns
Vector of components, each stored as (unordered) set of nodes.
std::map< index, count > NetworKit::DynWeaklyConnectedComponents::getComponentSizes ( )
inline
Returns
Map from component to size.
count NetworKit::DynWeaklyConnectedComponents::numberOfComponents ( )
inline

Get the number of weakly connected components.

Returns
The number of weakly connected components.
void NetworKit::DynWeaklyConnectedComponents::run ( )
overridevirtual

This method determines the weakly connected components for the graph given in the constructor.

Implements NetworKit::Algorithm.

void NetworKit::DynWeaklyConnectedComponents::update ( GraphEvent  event)
overridevirtual

Updates the weakly connected components after an edge insertion or deletion.

Parameters
[in]eventThe event that happened (edge insertion or deletion).

Implements NetworKit::DynAlgorithm.

void NetworKit::DynWeaklyConnectedComponents::updateBatch ( const std::vector< GraphEvent > &  batch)
overridevirtual

Updates the weakly connected components after a batch of edge events (insertions or deletions).

Parameters
[in]batchA vector that contains a batch of edge events (insertions or deletions).

Implements NetworKit::DynAlgorithm.


The documentation for this class was generated from the following files: