|
Drools Planner distribution 6.0.0.Alpha9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Score<S extends Score>
A Score is result of the score function (AKA fitness function) on a single possible solution.
Implementations must be immutable. Implementations are allowed to optionally implement Pareto comparison and therefore slightly violate the transitive requirement ofComparable.compareTo(Object)
.
AbstractScore
,
HardSoftScore
Method Summary | |
---|---|
S |
add(S augment)
Returns a Score whose value is (this + augment). |
S |
divide(double divisor)
Returns a Score whose value is (this / divisor). |
S |
multiply(double multiplicand)
Returns a Score whose value is (this * multiplicand). |
S |
subtract(S subtrahend)
Returns a Score whose value is (this - subtrahend). |
double[] |
toDoubleLevels()
Returns an array of doubles representing the Score. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
S add(S augment)
augment
- value to be added to this Score
S subtract(S subtrahend)
subtrahend
- value to be subtracted from this Score
S multiply(double multiplicand)
Math.floor(double)
.
/> If the implementation has a scale/precision, then the unspecified scale/precision of the double multiplicand should have no impact on the returned scale/precision.
multiplicand
- value to be multiplied by this Score.
S divide(double divisor)
Math.floor(double)
.
/> If the implementation has a scale/precision, then the unspecified scale/precision of the double divisor should have no impact on the returned scale/precision.
divisor
- value by which this Score is to be divided
double[] toDoubleLevels()
Math.floor(double)
.
The length of the returned array must be stable for a specific Score
implementation.
For example: -0hard/-7soft returns new double{-0.0, -7.0}
|
Drools Planner distribution 6.0.0.Alpha9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |