public class ScoreUtils extends Object
Modifier and Type | Method and Description |
---|---|
static double |
calculateTimeGradient(Number[] totalDiffNumbers,
Number[] scoreDiffNumbers,
double[] timeGradientWeightNumbers,
int levelDepth) |
static double[] |
extractLevelDoubles(Score score) |
static Score |
parseScore(Class<? extends Score> scoreClass,
String scoreString) |
public static Score parseScore(Class<? extends Score> scoreClass, String scoreString)
scoreClass
- never null, should be of the same ClassLoader
as this class.scoreString
- never nullIllegalArgumentException
- if the scoreClass is a custom Score
ScoreDefinition.parseScore(String)
public static double[] extractLevelDoubles(Score score)
public static double calculateTimeGradient(Number[] totalDiffNumbers, Number[] scoreDiffNumbers, double[] timeGradientWeightNumbers, int levelDepth)
totalDiffNumbers
- never nullscoreDiffNumbers
- never nulltimeGradientWeightNumbers
- never nulllevelDepth
- The number of levels of the diffNumbers that are included0.0 <= value <= 1.0
Copyright © 2006–2018 JBoss by Red Hat. All rights reserved.