Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.drools.planner.core.score.definition
Interface ScoreDefinition<S extends Score>

All Known Implementing Classes:
  AbstractScoreDefinition, HardAndSoftLongScoreDefinition, HardAndSoftScoreDefinition, SimpleDoubleScoreDefinition, SimpleScoreDefinition

    public interface ScoreDefinition<S extends Score>

A ScoreDefinition knows how to compare scores and what the perfect maximum/minimum Score is.

See Also:
  `AbstractScoreDefinition`, `HardAndSoftScoreDefinition`

Method Summary
`ScoreHolder` | `buildScoreHolder()` TODO JBRULES-2238 remove when the rule that sums the final score can be written as a single rule and `ScoreHolder` is dead
`double` | `calculateTimeGradient(S startScore, S endScore, S score)` See explanation in `Termination.calculateSolverTimeGradient(DefaultSolverScope)`.
`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.
`Score` | `parseScore(String scoreString)` Parses the String and returns a Score.
`Double` | `translateScoreToGraphValue(S score)`

Method Detail

### getPerfectMaximumScore

    S getPerfectMaximumScore()

  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.

  Returns:
    null if not supported

### getPerfectMinimumScore

    S getPerfectMinimumScore()

  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.

  Returns:
    null if not supported

### parseScore

    Score parseScore(String scoreString)

  Parses the String and returns a Score.

  Parameters:
    `scoreString` - never null
  Returns:
    never null

### calculateTimeGradient

    double calculateTimeGradient(S startScore,
                                 S endScore,
                                 S score)

  See explanation in `Termination.calculateSolverTimeGradient(DefaultSolverScope)`.

  Parameters:
    `startScore` - never null
    `endScore` - never null
    `score` - never null
  Returns:
    between 0.0 and 1.0

### translateScoreToGraphValue

    Double translateScoreToGraphValue(S score)

  Parameters:
    `score` - never null
  Returns:
    null if should not be shown on the graph

### buildScoreHolder

    ScoreHolder buildScoreHolder()

  TODO JBRULES-2238 remove when the rule that sums the final score can be written as a single rule and `ScoreHolder` is dead

  Returns:
    never null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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