Class RandomBFS

Inheritance Relationships

Base Type

Class Documentation

class RandomBFS : public NetworKit::SelectiveCommunityDetector

Public Functions

RandomBFS(const Graph &g, const Cover &c)
virtual std::set<node> expandOneCommunity(const std::set<node> &s) override
Parameters:
  • s[in] seed node

  • community[out] as a set of 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.

Protected Attributes

const Cover *c
std::map<index, count> subsetSizes