Class MLComparators<U>

java.lang.Object
es.uam.eps.ir.relison.links.linkprediction.MLComparators<U>
Type Parameters:
U - type of the users.

public class MLComparators<U>
extends java.lang.Object
Comparators for ordering the link prediction algorithms.
  • Constructor Summary

    Constructors 
    Constructor Description
    MLComparators()  
  • Method Summary

    Modifier and Type Method Description
    static <U> java.util.Comparator<org.ranksys.core.util.tuples.Tuple2od<Pair<U>>> ascendingComparator​(java.util.List<U> nodes)
    Sorts values in ascending score order (top ranking is the lowest value)
    static <U> java.util.Comparator<org.ranksys.core.util.tuples.Tuple2od<Pair<U>>> descendingComparator​(java.util.List<U> nodes)
    Sorts values in descending score order (top ranking is the greatest value)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • descendingComparator

      public static <U> java.util.Comparator<org.ranksys.core.util.tuples.Tuple2od<Pair<U>>> descendingComparator​(java.util.List<U> nodes)
      Sorts values in descending score order (top ranking is the greatest value)
      Type Parameters:
      U - type of the users
      Parameters:
      nodes - a list of nodes.
      Returns:
      the comparator.
    • ascendingComparator

      public static <U> java.util.Comparator<org.ranksys.core.util.tuples.Tuple2od<Pair<U>>> ascendingComparator​(java.util.List<U> nodes)
      Sorts values in ascending score order (top ranking is the lowest value)
      Type Parameters:
      U - type of the users
      Parameters:
      nodes - a list of nodes.
      Returns:
      the comparator.