Class CommuteTimeDistance

Inheritance Relationships

Base Type

Class Documentation

class CommuteTimeDistance : public NetworKit::Algorithm

CommuteTimeDistance edge centrality.

Public Functions

CommuteTimeDistance(const Graph &G, double tol = 0.1)

Constructs the CommuteTimeDistance class for the given Graph G.

Parameters:
  • G – The graph.

  • tol – The tolerance used for the approximation

~CommuteTimeDistance() override = default

Destructor.

virtual void run() override

Computes ECTD exactly.

void runApproximation()

Computes approximation by projection.

void runParallelApproximation()

Computes approximation by projection, in parallel.

uint64_t getSetupTime() const
Returns:

The elapsed time to setup the solver in milliseconds.

double runSinglePair(node u, node v)

Returns the commute time distance between node u and node v. This method does not need the initial preprocessing (no need to call the run() method).

Returns:

commute time distance between the two nodes.

double distance(node u, node v)

Returns the commute time distance between node u and node v.

Returns:

commute time distance between the two nodes. Needs to call run() or runApproximation() first.

double runSingleSource(node u)

Protected Attributes

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