Class Assortativity

Inheritance Relationships

Base Type

Class Documentation

class Assortativity : public NetworKit::Algorithm

Assortativity computes a coefficient that expresses the correlation of a node attribute among connected pairs of nodes.

Public Functions

Assortativity(const Graph &G, const std::vector<double> &attribute)

Initialize Assortativity with a graph G and an array of numerical node values.

Parameters:
  • G – The graph.

  • attribute – numerical node value array

Assortativity(const Graph &G, const Partition &partition)

Initialize Assortativity with a graph G and a partition of the node set

Parameters:
  • G – The graph.

  • partition – partition of the node set

virtual void run() override

Runs the algorithm. The algorithm is not parallel.

double getCoefficient() const

Return the assortativity coefficient.