src/core/Mutual.h

Mutual [Module]

Description

The Mutual module provides algorithms to identify mutual followers within the social graph.

Functions

std::vector<int> computeMutualFollowers(Graph& graph, const std::vector<int>& ids)
Computes the intersection of followers for a given list of user IDs.
Parameters
  • graph: The Graph object.
  • ids: Vector of user IDs to check.
Returns
Vector of user IDs who follow all the specified users.
void printVector(const std::vector<int>& v)
Utility function to print the contents of an integer vector to the console.