Program Listing for File NodeDistance.hpp

Return to documentation for file (include/networkit/distance/NodeDistance.hpp)

/*
 * NodeDistance.hpp
 *
 *  Created on: 18.06.2013
 *      Author: cls
 */

#ifndef NETWORKIT_DISTANCE_NODE_DISTANCE_HPP_
#define NETWORKIT_DISTANCE_NODE_DISTANCE_HPP_

#include <networkit/graph/Graph.hpp>

namespace NetworKit {

class NodeDistance {

protected:
    const Graph *G;

public:
    NodeDistance(const Graph &G) : G(&G) {}

    virtual ~NodeDistance() = default;

    virtual void preprocess() = 0;

    virtual double distance(node u, node v) = 0;

    virtual const std::vector<double> &getEdgeScores() const = 0;
};

} /* namespace NetworKit */
#endif // NETWORKIT_DISTANCE_NODE_DISTANCE_HPP_