Program Listing for File MaximalCliques.hpp

Return to documentation for file (include/networkit/clique/MaximalCliques.hpp)

#ifndef NETWORKIT_CLIQUE_MAXIMAL_CLIQUES_HPP_
#define NETWORKIT_CLIQUE_MAXIMAL_CLIQUES_HPP_

#include <functional>

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

namespace NetworKit {

class MaximalCliques final : public Algorithm {

public:
    MaximalCliques(const Graph &G, bool maximumOnly = false);

    MaximalCliques(const Graph &G, std::function<void(const std::vector<node> &)> callback);

    void run() override;

    const std::vector<std::vector<node>> &getCliques() const;

private:
    const Graph *G;

    std::vector<std::vector<node>> result;

    std::function<void(const std::vector<node> &)> callback;
    bool maximumOnly;
};

} // namespace NetworKit

#endif // NETWORKIT_CLIQUE_MAXIMAL_CLIQUES_HPP_