Program Listing for File CommunityDetectionAlgorithm.hpp

Return to documentation for file (include/networkit/community/CommunityDetectionAlgorithm.hpp)

/*
 * CommunityDetectionAlgorithm.hpp
 *
 *  Created on: 30.10.2012
 *      Author: Christian Staudt
 */

#ifndef NETWORKIT_COMMUNITY_COMMUNITY_DETECTION_ALGORITHM_HPP_
#define NETWORKIT_COMMUNITY_COMMUNITY_DETECTION_ALGORITHM_HPP_

#include <networkit/base/Algorithm.hpp>
#include <networkit/graph/Graph.hpp>
#include <networkit/structures/Partition.hpp>

namespace NetworKit {

class CommunityDetectionAlgorithm : public Algorithm {
public:
    CommunityDetectionAlgorithm(const Graph &G);

    CommunityDetectionAlgorithm(const Graph &G, Partition baseClustering);

    ~CommunityDetectionAlgorithm() override = default;

    void run() override = 0;

    virtual const Partition &getPartition() const;

protected:
    const Graph *G;
    Partition result;
};

} /* namespace NetworKit */
#endif // NETWORKIT_COMMUNITY_COMMUNITY_DETECTION_ALGORITHM_HPP_