Program Listing for File DynConnectedComponents.hpp

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

/*
 * DynConnectedComponents.hpp
 *
 *  Created on: June 2017
 *      Author: Eugenio Angriman
 */

#ifndef NETWORKIT_COMPONENTS_DYN_CONNECTED_COMPONENTS_HPP_
#define NETWORKIT_COMPONENTS_DYN_CONNECTED_COMPONENTS_HPP_

#include <memory>
#include <vector>

#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 DynConnectedComponents final : public ComponentDecomposition, public DynAlgorithm {

public:
    DynConnectedComponents(const Graph &G);

    ~DynConnectedComponents() override;

    void run() override;

    void update(GraphEvent e) override;

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

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

} // namespace NetworKit

#endif // NETWORKIT_COMPONENTS_DYN_CONNECTED_COMPONENTS_HPP_