↰ Return to documentation for file (include/networkit/distance/CommuteTimeDistance.hpp
)
/*
* CommuteTimeDistance.hpp
*
* Created on: 12.04.2016
* Author: ebergamini
*/
#ifndef NETWORKIT_DISTANCE_COMMUTE_TIME_DISTANCE_HPP_
#define NETWORKIT_DISTANCE_COMMUTE_TIME_DISTANCE_HPP_
#include <networkit/algebraic/CSRMatrix.hpp>
#include <networkit/base/Algorithm.hpp>
#include <networkit/graph/Graph.hpp>
#include <networkit/numerics/LAMG/Lamg.hpp>
namespace NetworKit {
class CommuteTimeDistance final : public Algorithm {
public:
CommuteTimeDistance(const Graph &G, double tol = 0.1);
~CommuteTimeDistance() override = default;
void run() override;
void runApproximation();
void runParallelApproximation();
uint64_t getSetupTime() const;
double runSinglePair(node u, node v);
double distance(node u, node v);
double runSingleSource(node u);
protected:
const Graph *G;
double tol;
Lamg<CSRMatrix> lamg;
uint64_t setupTime;
std::vector<std::vector<double>> distances;
std::vector<Vector> solutions;
bool exactly;
count k;
};
} /* namespace NetworKit */
#endif // NETWORKIT_DISTANCE_COMMUTE_TIME_DISTANCE_HPP_