Program Listing for File EffectiveDiameterApproximation.hpp

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

/*
 *  EffectiveDiameterApproximation.hpp
 *
 *  Created on: 29.03.16
 *      Author: Maximilian Vogel
 */

#ifndef NETWORKIT_DISTANCE_EFFECTIVE_DIAMETER_APPROXIMATION_HPP_
#define NETWORKIT_DISTANCE_EFFECTIVE_DIAMETER_APPROXIMATION_HPP_

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

namespace NetworKit {

class EffectiveDiameterApproximation final : public Algorithm {

public:
    EffectiveDiameterApproximation(const Graph &G, double ratio = 0.9, count k = 64, count r = 7);

    void run() override;

    double getEffectiveDiameter() const;

private:
    const Graph *G;
    const double ratio;
    const count k;
    const count r;
    double effectiveDiameter;
};

} /* namespace NetworKit */

#endif // NETWORKIT_DISTANCE_EFFECTIVE_DIAMETER_APPROXIMATION_HPP_