Program Listing for File GraphDifference.hpp

Return to documentation for file (include/networkit/dynamics/GraphDifference.hpp)

#ifndef NETWORKIT_DYNAMICS_GRAPH_DIFFERENCE_HPP_
#define NETWORKIT_DYNAMICS_GRAPH_DIFFERENCE_HPP_

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

namespace NetworKit {

class GraphDifference final : public Algorithm {
public:
    GraphDifference(const Graph &G1, const Graph &G2);

    void run() override;

    const std::vector<GraphEvent> &getEdits() const;

    count getNumberOfEdits() const;

    count getNumberOfNodeAdditions() const;

    count getNumberOfNodeRemovals() const;

    count getNumberOfNodeRestorations() const;

    count getNumberOfEdgeAdditions() const;

    count getNumberOfEdgeRemovals() const;

    count getNumberOfEdgeWeightUpdates() const;

private:
    const Graph *G1, *G2;
    std::vector<GraphEvent> edits;
    count numEdits;
    count numNodeAdditions;
    count numNodeRemovals;
    count numNodeRestorations;
    count numEdgeAdditions;
    count numEdgeRemovals;
    count numWeightUpdates;
};

} // namespace NetworKit

#endif // NETWORKIT_DYNAMICS_GRAPH_DIFFERENCE_HPP_