Class NeighborhoodUtility

Class Documentation

class NeighborhoodUtility

Provides basic operations on neighborhoods in a given graph.

Public Static Functions

static std::vector<node> getNeighborsUnion(const Graph &G, node u, node v)

Returns the union of the neighboorhoods of u and v.

Parameters:
  • GGraph to obtain neighbors-union from

  • u – First node

  • v – Second node

Returns:

a vector containing all the nodes in the neighborhood-union of u and v

static std::vector<node> getCommonNeighbors(const Graph &G, node u, node v)

Returns a vector containing the node-ids of all common neighbors of u and v.

Parameters:
  • GGraph to obtain common neighbors from

  • u – First node

  • v – Second node

Returns:

a vector containing the node-ids of all common neighbors of u and v