org.drools.planner.core.score.definition
Class AbstractScoreDefinition<S extends Score>

java.lang.Object
  extended by org.drools.planner.core.score.definition.AbstractScoreDefinition<S>
All Implemented Interfaces:
Serializable, ScoreDefinition<S>
Direct Known Subclasses:
HardAndSoftLongScoreDefinition, HardAndSoftScoreDefinition, SimpleDoubleScoreDefinition, SimpleScoreDefinition

public abstract class AbstractScoreDefinition<S extends Score>
extends Object
implements ScoreDefinition<S>, Serializable

Abstract superclass for ScoreDefinition.

See Also:
ScoreDefinition, HardAndSoftScoreDefinition, Serialized Form

Constructor Summary
AbstractScoreDefinition()
           
 
Method Summary
 S getPerfectMaximumScore()
          The perfect maximum score is the score of which there is no better in any problem instance.
 S getPerfectMinimumScore()
          The perfect minimum score is the score of which there is no worser in any problem instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.drools.planner.core.score.definition.ScoreDefinition
buildScoreHolder, calculateTimeGradient, parseScore, translateScoreToGraphValue
 

Constructor Detail

AbstractScoreDefinition

public AbstractScoreDefinition()
Method Detail

getPerfectMaximumScore

public S 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<S extends Score>
Returns:
null if not supported

getPerfectMinimumScore

public S 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<S extends Score>
Returns:
null if not supported


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.