NetworKit::AlgebraicDistance Class Reference

Algebraic distance assigns a distance value to pairs of nodes according to their structural closeness in the graph. More...

`#include <AlgebraicDistance.h>`

Public Member Functions

AlgebraicDistance (const Graph &G, count numberSystems=10, count numberIterations=30, double omega=0.5, index norm=0, bool withEdgeScores=false)

virtual void preprocess ()
Perform preprocessing work. More...

virtual double distance (node u, node v)

virtual std::vector< double > getEdgeScores ()
Returns the distances between all connected pairs of nodes. More...

Public Member Functions inherited from NetworKit::NodeDistance
NodeDistance (const Graph &G)
Constructs the NodeDistance class for the given Graph G. More...

virtual ~NodeDistance ()=default
Default destructor. More...

Protected Member Functions

void randomInit ()
initialize vectors randomly More...

Protected Attributes

count numSystems
number of vectors/systems used for algebraic iteration More...

count numIters
number of iterations in each system More...

double omega
attenuation factor influencing the speed of convergence More...

index norm

const index MAX_NORM = 0

bool withEdgeScores

std::vector< double > edgeScores
distance(u,v) for edge {u,v} More...

Protected Attributes inherited from NetworKit::NodeDistance
const GraphG

Detailed Description

Algebraic distance assigns a distance value to pairs of nodes according to their structural closeness in the graph.

Algebraic distances will become small within dense subgraphs.

Constructor & Destructor Documentation

 NetworKit::AlgebraicDistance::AlgebraicDistance ( const Graph & G, count numberSystems = `10`, count numberIterations = `30`, double omega = `0.5`, index norm = `0`, bool withEdgeScores = `false` )
Parameters
 G The graph. numberSystems Number of vectors/systems used for algebraic iteration. numberIterations Number of iterations in each system. omega attenuation factor influencing convergence speed. norm The norm factor of the extended algebraic distance. withEdgeScores calculate array of scores for edges {u,v} that equal ad(u,v)

Member Function Documentation

 double NetworKit::AlgebraicDistance::distance ( node u, node v )
virtual
Returns
algebraic distance between the two nodes.

Implements NetworKit::NodeDistance.

 std::vector< double > NetworKit::AlgebraicDistance::getEdgeScores ( )
virtual

Returns the distances between all connected pairs of nodes.

Returns
Vector containing the distances between all connected pairs of nodes.

Implements NetworKit::NodeDistance.

 void NetworKit::AlgebraicDistance::preprocess ( )
virtual

Perform preprocessing work.

Needs to be called before distances are requested.

Implements NetworKit::NodeDistance.

 void NetworKit::AlgebraicDistance::randomInit ( )
protected

initialize vectors randomly

Member Data Documentation

 std::vector NetworKit::AlgebraicDistance::edgeScores
protected

distance(u,v) for edge {u,v}

protected

 const index NetworKit::AlgebraicDistance::MAX_NORM = 0
protected
 index NetworKit::AlgebraicDistance::norm
protected
 count NetworKit::AlgebraicDistance::numIters
protected

number of iterations in each system

 count NetworKit::AlgebraicDistance::numSystems
protected

number of vectors/systems used for algebraic iteration

 double NetworKit::AlgebraicDistance::omega
protected

attenuation factor influencing the speed of convergence

 bool NetworKit::AlgebraicDistance::withEdgeScores
protected

The documentation for this class was generated from the following files: