Program Listing for File PLM.hpp

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

/*
 * PLM.hpp
 *
 *  Created on: 20.11.2013
 *      Author: cls
 */

#ifndef NETWORKIT_COMMUNITY_PLM_HPP_
#define NETWORKIT_COMMUNITY_PLM_HPP_

#include <networkit/community/CommunityDetectionAlgorithm.hpp>

namespace NetworKit {

class PLM final : public CommunityDetectionAlgorithm {

public:
    PLM(const Graph &G, bool refine = false, double gamma = 1.0, std::string par = "balanced",
        count maxIter = 32, bool turbo = true, bool recurse = true);

    PLM(const Graph &G, const PLM &other);

    void run() override;

    static std::pair<Graph, std::vector<node>> coarsen(const Graph &G, const Partition &zeta);

    static Partition prolong(const Graph &Gcoarse, const Partition &zetaCoarse, const Graph &Gfine,
                             std::vector<node> nodeToMetaNode);

    const std::map<std::string, std::vector<count>> &getTiming() const;

private:
    std::string parallelism;
    bool refine;
    double gamma = 1.0;
    count maxIter;
    bool turbo;
    bool recurse;
    std::map<std::string, std::vector<count>> timing; // fine-grained running time measurement
};

} /* namespace NetworKit */

#endif // NETWORKIT_COMMUNITY_PLM_HPP_