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

## Class FixedSelectorProbabilityWeightFactory<Solution_,​Selector_ extends Selector>

- java.lang.Object
- - org.optaplanner.core.impl.heuristic.selector.common.decorator.FixedSelectorProbabilityWeightFactory<Solution_,​Selector_>

- All Implemented Interfaces:
    `SelectionProbabilityWeightFactory<Solution_,​Selector_>`

      public class FixedSelectorProbabilityWeightFactory<Solution_,​Selector_ extends Selector>
      extends Object
      implements SelectionProbabilityWeightFactory<Solution_,​Selector_>

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FixedSelectorProbabilityWeightFactory​(Map<Selector_,​Double> fixedProbabilityWeightMap)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `double` | `createProbabilityWeight​(ScoreDirector<Solution_> scoreDirector, Selector_ selector)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FixedSelectorProbabilityWeightFactory

          public FixedSelectorProbabilityWeightFactory​(Map<Selector_,​Double> fixedProbabilityWeightMap)

  - ### Method Detail

    - #### createProbabilityWeight

          public double createProbabilityWeight​(ScoreDirector<Solution_> scoreDirector,
                                                Selector_ selector)

      Specified by:
        `createProbabilityWeight` in interface `SelectionProbabilityWeightFactory<Solution_,​Selector_ extends Selector>`
      Parameters:
        `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` to which the selection belongs or applies to
        `selector` - never null, a `PlanningEntity`, a planningValue, a `Move` or a `Selector` to create the probabilityWeight for
      Returns:
        `0.0 <= returnValue <` `Double.POSITIVE_INFINITY`