Class LocalTightnessExpansion

Inheritance Relationships

Base Type

Class Documentation

class LocalTightnessExpansion : public NetworKit::SelectiveCommunityDetector

The Local Tightness Expansion (LTE) algorithm.

The algorithm can handle weighted graphs.

This is the local community expansion algorithm described in

Huang, J., Sun, H., Liu, Y., Song, Q., & Weninger, T. (2011). Towards Online Multiresolution Community Detection in Large-Scale Networks. PLOS ONE, 6(8), e23829. https://doi.org/10.1371/journal.pone.0023829

Public Functions

LocalTightnessExpansion(const Graph &g, double alpha = 1.0)

Constructs the Local Tightness Expansion algorithm.

Parameters:
  • G[in] The graph to detect communities on

  • alpha[in] Tightness coefficient - smaller values lead to larger communities

virtual std::set<node> expandOneCommunity(const std::set<node> &s) override

Expands a set of seed nodes into a community.

Parameters:

s[in] The seed nodes

Returns:

A community of the seed nodes

std::set<node> expandOneCommunity(node seed)

Detect a community for the given seed node.

The default implementation calls expandOneCommunity(const std::set<node>&) with a set of one node.

Parameters:

seed – The seed to find the community for.

Returns:

The found community as set of node.

std::set<node> expandOneCommunity(const std::set<node> &seeds) = 0

Detect a single community for the given seed nodes.

This is useful if you know multiple nodes that should be part of the community. This method may throw an exception if the particular algorithm does not support multiple seeds.

Parameters:

seeds – The seeds for the community.

Returns:

The found community as set of nodes.