All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
NetworKit::NodeDistance Class Referenceabstract

Abstract base class for node distance measures. More...

#include <NodeDistance.h>

Public Member Functions

 NodeDistance (const Graph &G)
 Constructs the NodeDistance class for the given Graph G. More...
 
virtual ~NodeDistance ()=default
 Default destructor. More...
 
virtual void preprocess ()=0
 Perform preprocessing work. More...
 
virtual double distance (node u, node v)=0
 Return the distance between two nodes. More...
 
virtual std::vector< double > getEdgeScores ()=0
 Returns the distances between all connected pairs of nodes. More...
 

Protected Attributes

const GraphG
 

Detailed Description

Abstract base class for node distance measures.

Constructor & Destructor Documentation

NetworKit::NodeDistance::NodeDistance ( const Graph G)

Constructs the NodeDistance class for the given Graph G.

Parameters
GThe graph.
virtual NetworKit::NodeDistance::~NodeDistance ( )
virtualdefault

Default destructor.

Member Function Documentation

virtual double NetworKit::NodeDistance::distance ( node  u,
node  v 
)
pure virtual

Return the distance between two nodes.

The distance must be normed to return a distance between 0 and 1.

Implemented in NetworKit::AlgebraicDistance, NetworKit::AdamicAdarDistance, and NetworKit::JaccardDistance.

virtual std::vector<double> NetworKit::NodeDistance::getEdgeScores ( )
pure virtual

Returns the distances between all connected pairs of nodes.

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

Implemented in NetworKit::AdamicAdarDistance, NetworKit::AlgebraicDistance, and NetworKit::JaccardDistance.

virtual void NetworKit::NodeDistance::preprocess ( )
pure virtual

Perform preprocessing work.

Needs to be called before distances are requested.

Implemented in NetworKit::AlgebraicDistance, NetworKit::AdamicAdarDistance, and NetworKit::JaccardDistance.

Member Data Documentation

const Graph& NetworKit::NodeDistance::G
protected

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