↰ Return to documentation for file (include/networkit/distance/AlgebraicDistance.hpp
)
/*
* AlgebraicDistance.hpp
*
* Created on: 03.11.2015
* Author: Henning Meyerhenke, Christian Staudt, Michael Hamann
*/
#ifndef NETWORKIT_DISTANCE_ALGEBRAIC_DISTANCE_HPP_
#define NETWORKIT_DISTANCE_ALGEBRAIC_DISTANCE_HPP_
#include <networkit/distance/NodeDistance.hpp>
namespace NetworKit {
class AlgebraicDistance final : public NodeDistance {
public:
AlgebraicDistance(const Graph &G, count numberSystems = 10, count numberIterations = 30,
double omega = 0.5, index norm = 0, bool withEdgeScores = false);
void preprocess() override;
double distance(node u, node v) override;
const std::vector<double> &getEdgeScores() const override;
private:
void randomInit();
count numSystems;
count numIters;
double omega;
index norm;
const index MAX_NORM = 0;
bool withEdgeScores;
std::vector<double> loads;
std::vector<edgeweight> edgeScores;
};
} /* namespace NetworKit */
#endif // NETWORKIT_DISTANCE_ALGEBRAIC_DISTANCE_HPP_