Class PredictionsSorter

Nested Relationships

Nested Types

Class Documentation

class PredictionsSorter

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

Public Static Functions

static void sortByScore(std::vector<LinkPredictor::prediction> &predictions)

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:

predictions – The predictions to sort

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

Sorts the predictions ascendingly by node-pair. This means for example (0, 0) < (0, 1) and (1, 1) < (1, 0).

Parameters:

predictions – The predictions to sort