Class MissingLinksFinder

Class Documentation

class MissingLinksFinder

Allows the user to find missing links in the given graph. The absent links to find are narrowed down by providing a distance that the nodes of the missing links should have. For example in case of distance 2 only node-pairs that would close a triangle in the given graph get returned.

Public Functions

explicit MissingLinksFinder(const Graph &G)
Parameters:

G – The graph to find missing links in

std::vector<std::pair<node, node>> findAtDistance(count k)

Returns all missing links in the graph that have distance k. Note that a distance of k actually means that there are k different links on the path of the two nodes that are connected through that path.

Parameters:

k – Distance of the absent links

Returns:

an ascendingly sorted vector of node-pairs where there is a missing link of distance k between the two nodes

std::vector<std::pair<node, node>> findFromNode(node u, count k)

Returns all missing links in the graph that have distance k and are connected to u. Note that a distance of k actually means that there are k different links on the path of the two nodes that are connected through that path.

Parameters:
  • u – Node to find missing links from

  • k – Distance of the absent links

Returns:

a vector of node-pairs where there is a missing link of distance k between the given node u and another node in the graph