All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::MissingLinksFinder Class Reference

Allows the user to find missing links in the given graph. More...

#include <MissingLinksFinder.h>

Public Member Functions

 MissingLinksFinder (const Graph &G)
 
std::vector< std::pair< node,
node > > 
findAtDistance (count k)
 Returns all missing links in the graph that have distance k. More...
 
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. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

NetworKit::MissingLinksFinder::MissingLinksFinder ( const Graph G)
explicit
Parameters
GThe graph to find missing links in

Member Function Documentation

std::vector< std::pair< node, node > > NetworKit::MissingLinksFinder::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
kDistance 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 > > NetworKit::MissingLinksFinder::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
uNode to find missing links from
kDistance 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

The documentation for this class was generated from the following files: