Solution_ - Subclass of Solutionpublic interface ConstraintMatchAwareIncrementalScoreCalculator<Solution_ extends Solution> extends IncrementalScoreCalculator<Solution_>
IncrementalScoreCalculator to report ConstraintMatchTotals
for explaining a score (= which score constraints match for how much)
and also for score corruption analysis.IncrementalScoreCalculator| Modifier and Type | Method and Description |
|---|---|
Collection<ConstraintMatchTotal> |
getConstraintMatchTotals() |
void |
resetWorkingSolution(Solution_ workingSolution,
boolean constraintMatchEnabled)
Allows for increased performance by tracking only if constraintMatchEnabled is true.
|
afterEntityAdded, afterEntityRemoved, afterVariableChanged, beforeEntityAdded, beforeEntityRemoved, beforeVariableChanged, calculateScore, resetWorkingSolutionvoid resetWorkingSolution(Solution_ workingSolution, boolean constraintMatchEnabled)
Every implementation should call IncrementalScoreCalculator.resetWorkingSolution(Solution)
and only handle the constraintMatchEnabled parameter specifically (or ignore it).
workingSolution - never null, to pass to IncrementalScoreCalculator.resetWorkingSolution(Solution).constraintMatchEnabled - true if getConstraintMatchTotals() might be called.Collection<ConstraintMatchTotal> getConstraintMatchTotals()
IllegalStateException - if resetWorkingSolution(Solution, boolean)'s
constraintMatchEnabled parameter was falseScoreDirector.getConstraintMatchTotals()Copyright © 2006–2016 JBoss by Red Hat. All rights reserved.