Program Listing for File SuitorMatcher.hpp

Return to documentation for file (include/networkit/matching/SuitorMatcher.hpp)

/*
 *  SuitorMatcher.hpp
 *
 *  Created on: 27.08.2019
 *  Authors: Michal Boron     <michal.s.boron@gmail.com>
 *           Eugenio Angriman <angrimae@hu-berlin.de>
 */

#ifndef NETWORKIT_MATCHING_SUITOR_MATCHER_HPP_
#define NETWORKIT_MATCHING_SUITOR_MATCHER_HPP_

#include <vector>

#include <networkit/graph/Graph.hpp>
#include <networkit/matching/Matcher.hpp>

namespace NetworKit {

class SuitorMatcher final : public Matcher {

    static bool hasEdgesSortedByWeight(const Graph &G);

    void findSuitor(node current);
    void findSortSuitor(node current);

public:
    SuitorMatcher(const Graph &G, bool sortSuitor = true, bool checkSortedEdges = false);

    ~SuitorMatcher() override = default;

    void run() override;

private:
    bool sortSuitor;
    std::vector<node> suitor;
    std::vector<edgeweight> ws;
    std::vector<index> neighborIterators;
};
} // namespace NetworKit

#endif // NETWORKIT_MATCHING_SUITOR_MATCHER_HPP_