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.buildin.simpledouble
Class SimpleDoubleScoreDefinition

    java.lang.Object
      org.drools.planner.core.score.definition.AbstractScoreDefinition<SimpleDoubleScore>
          org.drools.planner.core.score.buildin.simpledouble.SimpleDoubleScoreDefinition

All Implemented Interfaces:
  Serializable, ScoreDefinition<SimpleDoubleScore>

    public class SimpleDoubleScoreDefinition

extends AbstractScoreDefinition<SimpleDoubleScore>

See Also:
  Serialized Form

Constructor Summary
`SimpleDoubleScoreDefinition()`

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(SimpleDoubleScore startScore, SimpleDoubleScore endScore, SimpleDoubleScore score)` See explanation in `Termination.calculateSolverTimeGradient(DefaultSolverScope)`.
`SimpleDoubleScore` | `getPerfectMaximumScore()` The perfect maximum score is the score of which there is no better in any problem instance.
`SimpleDoubleScore` | `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(SimpleDoubleScore perfectMaximumScore)`
`void` | `setPerfectMinimumScore(SimpleDoubleScore perfectMinimumScore)`
`Double` | `translateScoreToGraphValue(SimpleDoubleScore score)`

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

Constructor Detail

### SimpleDoubleScoreDefinition

    public SimpleDoubleScoreDefinition()

Method Detail

### setPerfectMaximumScore

    public void setPerfectMaximumScore(SimpleDoubleScore perfectMaximumScore)

### setPerfectMinimumScore

    public void setPerfectMinimumScore(SimpleDoubleScore perfectMinimumScore)

### getPerfectMaximumScore

    public SimpleDoubleScore 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<SimpleDoubleScore>`
  Overrides:
    `getPerfectMaximumScore` in class `AbstractScoreDefinition<SimpleDoubleScore>`
  Returns:
    null if not supported

### getPerfectMinimumScore

    public SimpleDoubleScore 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<SimpleDoubleScore>`
  Overrides:
    `getPerfectMinimumScore` in class `AbstractScoreDefinition<SimpleDoubleScore>`
  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(SimpleDoubleScore startScore,
                                        SimpleDoubleScore endScore,
                                        SimpleDoubleScore 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(SimpleDoubleScore score)

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

### buildScoreHolder

    public ScoreHolder buildScoreHolder()

  Description copied from interface: `ScoreDefinition`
  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.