public class ScoreTools extends Object
| Constructor and Description |
|---|
ScoreTools() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V extends Comparable<? super V>> |
entriesSortedByValues(Map<K,V> map,
boolean descending) |
static <E> E |
getRandom(List<E> list,
Random random) |
static double |
normalized(double value,
double min,
double range)
Normalize a value to the range 0..1 (inclusive)
|
public static double normalized(double value,
double min,
double range)
value - Value to normalizemin - The minimum of all valuesrange - The range of the values (max - min)public static <K,V extends Comparable<? super V>> SortedSet<Map.Entry<K,V>> entriesSortedByValues(Map<K,V> map, boolean descending)
Copyright © 2014. All rights reserved.