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

Allows the sorting of predictions by score or node-pair. More...

#include <PredictionsSorter.h>

Static Public Member Functions

static void sortByScore (std::vector< LinkPredictor::prediction > &predictions)
 Sorts the predictions descendingly by score. More...
 
static void sortByNodePair (std::vector< LinkPredictor::prediction > &predictions)
 Sorts the predictions ascendingly by node-pair. More...
 

Detailed Description

Allows the sorting of predictions by score or node-pair.

Member Function Documentation

void NetworKit::PredictionsSorter::sortByNodePair ( std::vector< LinkPredictor::prediction > &  predictions)
static

Sorts the predictions ascendingly by node-pair.

This means for example (0, 0) < (0, 1) and (1, 1) < (1, 0).

Parameters
predictionsThe predictions to sort
void NetworKit::PredictionsSorter::sortByScore ( std::vector< LinkPredictor::prediction > &  predictions)
static

Sorts the predictions descendingly by score.

In case there is a tie the node-pairs are used as a tie-breaker by sorting them ascendingly on the first node and on a tie ascendingly by the second node.

Parameters
predictionsThe predictions to sort

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