org.drools.planner.core.score.definition
Class SimpleScoreDefinition
java.lang.Object
org.drools.planner.core.score.definition.AbstractScoreDefinition<SimpleScore>
org.drools.planner.core.score.definition.SimpleScoreDefinition
- All Implemented Interfaces:
- Serializable, ScoreDefinition<SimpleScore>
public class SimpleScoreDefinition
- extends AbstractScoreDefinition<SimpleScore>
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleScoreDefinition
public SimpleScoreDefinition()
setPerfectMaximumScore
public void setPerfectMaximumScore(SimpleScore perfectMaximumScore)
setPerfectMinimumScore
public void setPerfectMinimumScore(SimpleScore perfectMinimumScore)
getPerfectMaximumScore
public SimpleScore getPerfectMaximumScore()
- Description copied from interface:
ScoreDefinition
- The perfect maximum 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 scores.
- Specified by:
getPerfectMaximumScore
in interface ScoreDefinition<SimpleScore>
- Overrides:
getPerfectMaximumScore
in class AbstractScoreDefinition<SimpleScore>
- Returns:
- null if not supported
getPerfectMinimumScore
public SimpleScore getPerfectMinimumScore()
- Description copied from interface:
ScoreDefinition
- The perfect minimum score is the score of which there is no worser 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.
- Specified by:
getPerfectMinimumScore
in interface ScoreDefinition<SimpleScore>
- Overrides:
getPerfectMinimumScore
in class AbstractScoreDefinition<SimpleScore>
- Returns:
- null if not supported
parseScore
public Score parseScore(String scoreString)
- Description copied from interface:
ScoreDefinition
- Parses the String and returns a Score.
- Parameters:
scoreString
- never null
- Returns:
- never null
calculateTimeGradient
public double calculateTimeGradient(SimpleScore startScore,
SimpleScore endScore,
SimpleScore score)
- Parameters:
startScore
- never nullendScore
- never nullscore
- never null
- Returns:
- between 0.0 and 1.0
translateScoreToGraphValue
public Double translateScoreToGraphValue(SimpleScore score)
- Parameters:
score
- never null
- Returns:
- null if should not be shown on the graph
Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.