org.optaplanner.core.impl.heuristic.selector.common.decorator

## Interface SelectionProbabilityWeightFactory<Solution_,T>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
    `T` - the selection type
  All Known Implementing Classes:
    FairSelectorProbabilityWeightFactory, FixedSelectorProbabilityWeightFactory

      public interface SelectionProbabilityWeightFactory<Solution_,T>

  Create a probabilityWeight for a selection (which is a `PlanningEntity`, a planningValue, a `Move` or a `Selector`). A probabilityWeight represents the random chance that a selection will be selected. Some use cases benefit from focusing moves more actively on specific selections.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `createProbabilityWeight(ScoreDirector<Solution_> scoreDirector, T selection)`

- - ### Method Detail

    - #### createProbabilityWeight

          double createProbabilityWeight(ScoreDirector<Solution_> scoreDirector,
                                         T selection)

      Parameters:
        `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` to which the selection belongs or applies to
        `selection` - never null, a `PlanningEntity`, a planningValue, a `Move` or a `Selector` to create the probabilityWeight for
      Returns:
        `0.0 <= returnValue <` `Double.POSITIVE_INFINITY`

Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.