public class BendableScoreDefinition extends AbstractScoreDefinition<BendableScore>
Constructor and Description |
---|
BendableScoreDefinition(int hardLevelCount,
int softLevelCount) |
Modifier and Type | Method and Description |
---|---|
ScoreHolder |
buildScoreHolder(boolean constraintMatchEnabled) |
double |
calculateTimeGradient(BendableScore startScore,
BendableScore endScore,
BendableScore score)
See explanation in
Termination.calculateSolverTimeGradient(DefaultSolverScope) . |
BendableScore |
createScore(int... scores) |
int |
getHardLevelCount() |
BendableScore |
getPerfectMaximumScore()
|
BendableScore |
getPerfectMinimumScore()
|
double |
getRecursiveTimeGradientWeight() |
Class<BendableScore> |
getScoreClass()
|
int |
getSoftLevelCount() |
Score |
parseScore(String scoreString)
|
void |
setPerfectMaximumScore(BendableScore perfectMaximumScore) |
void |
setPerfectMinimumScore(BendableScore perfectMinimumScore) |
void |
setRecursiveTimeGradientWeight(double recursiveTimeGradientWeight)
It's recommended to use a number which can be exactly represented as a double,
such as 0.5, 0.25, 0.75, 0.125, ... but not 0.1, 0.2, ...
|
formatScore
public BendableScoreDefinition(int hardLevelCount, int softLevelCount)
public int getHardLevelCount()
public int getSoftLevelCount()
public double getRecursiveTimeGradientWeight()
public void setRecursiveTimeGradientWeight(double recursiveTimeGradientWeight)
recursiveTimeGradientWeight
- 0.0 <= recursiveTimeGradientWeight <= 1.0public BendableScore getPerfectMaximumScore()
ScoreDefinition
Score
is the Score
of which there is no better in any problem instance.
This doesn't mean that the current problem instance, or any problem instance for that matter,
could ever attain that Score
.
For example, most cases have a perfect maximum Score
of zero, as most use cases only have negative
constraints.getPerfectMaximumScore
in interface ScoreDefinition<BendableScore>
getPerfectMaximumScore
in class AbstractScoreDefinition<BendableScore>
public void setPerfectMaximumScore(BendableScore perfectMaximumScore)
public BendableScore getPerfectMinimumScore()
ScoreDefinition
Score
is the Score
of which there is no worse in any problem instance.
This doesn't mean that the current problem instance, or any problem instance for that matter,
could ever attain such a bad Score
.
For example, most cases have a perfect minimum Score
of negative infinity.getPerfectMinimumScore
in interface ScoreDefinition<BendableScore>
getPerfectMinimumScore
in class AbstractScoreDefinition<BendableScore>
public void setPerfectMinimumScore(BendableScore perfectMinimumScore)
public Class<BendableScore> getScoreClass()
ScoreDefinition
public Score parseScore(String scoreString)
ScoreDefinition
scoreString
- never nullScoreDefinition.formatScore(Score)
public BendableScore createScore(int... scores)
public double calculateTimeGradient(BendableScore startScore, BendableScore endScore, BendableScore score)
ScoreDefinition
Termination.calculateSolverTimeGradient(DefaultSolverScope)
.startScore
- never nullendScore
- never nullscore
- never nullpublic ScoreHolder buildScoreHolder(boolean constraintMatchEnabled)
constraintMatchEnabled
- true if ScoreHolder.isConstraintMatchEnabled()
should be trueCopyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.