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
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

Constructor Summary
`SimpleScoreDefinition()`

Method Summary
`ScoreCalculator` | `buildScoreCalculator()` TODO remove when the rule that sums the final score can be written as a single rule and ScoreCalculator is dead
`double` | `calculateTimeGradient(SimpleScore startScore, SimpleScore endScore, SimpleScore score)` See explanation in `Termination.calculateSolverTimeGradient(DefaultSolverScope)`.
`SimpleScore` | `getPerfectMaximumScore()` The perfect maximum score is the score of which there is no better in any problem instance.
`SimpleScore` | `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.
`void` | `setPerfectMaximumScore(SimpleScore perfectMaximumScore)`
`void` | `setPerfectMinimumScore(SimpleScore perfectMinimumScore)`
`Double` | `translateScoreToGraphValue(SimpleScore score)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleScoreDefinition

    public SimpleScoreDefinition()

Method Detail

### 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)

  Description copied from interface: `ScoreDefinition`
  See explanation in `Termination.calculateSolverTimeGradient(DefaultSolverScope)`.

  Parameters:
    `startScore` - never null
    `endScore` - never null
    `score` - 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

### buildScoreCalculator

    public ScoreCalculator buildScoreCalculator()

  Description copied from interface: `ScoreDefinition`
  TODO remove when the rule that sums the final score can be written as a single rule and ScoreCalculator 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-2011 JBoss by Red Hat. All Rights Reserved.