Program Listing for File DynWeaklyConnectedComponents.hpp

Return to documentation for file (include/networkit/components/DynWeaklyConnectedComponents.hpp)

/*
 * DynWeaklyConnectedComponents.hpp
 *
 *  Created on: June 20, 2017
 *      Author: Eugenio Angriman
 */

#ifndef NETWORKIT_COMPONENTS_DYN_WEAKLY_CONNECTED_COMPONENTS_HPP_
#define NETWORKIT_COMPONENTS_DYN_WEAKLY_CONNECTED_COMPONENTS_HPP_

#include <memory>

#include <networkit/base/DynAlgorithm.hpp>
#include <networkit/components/ComponentDecomposition.hpp>
#include <networkit/dynamics/GraphEvent.hpp>
#include <networkit/graph/Graph.hpp>

namespace NetworKit {

// pImpl
namespace DynConnectedComponentsDetails {
template <bool>
class DynConnectedComponentsImpl;
} // namespace DynConnectedComponentsDetails

class DynWeaklyConnectedComponents final : public ComponentDecomposition, public DynAlgorithm {

public:
    DynWeaklyConnectedComponents(const Graph &G);

    ~DynWeaklyConnectedComponents() override;

    void run() override;

    void update(GraphEvent event) override;

    void updateBatch(const std::vector<GraphEvent> &batch) override;

private:
    std::unique_ptr<DynConnectedComponentsDetails::DynConnectedComponentsImpl<true>> impl;
};

} // namespace NetworKit

#endif // NETWORKIT_COMPONENTS_DYN_WEAKLY_CONNECTED_COMPONENTS_HPP_