Interface SelectionProbabilityWeightFactory<Solution_,T>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotationT
- the selection type
- All Known Implementing Classes:
FairSelectorProbabilityWeightFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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.
Implementations are expected to be stateless. The solver may choose to reuse instances.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
createProbabilityWeight
(ScoreDirector<Solution_> scoreDirector, T selection)
-
Method Details
-
createProbabilityWeight
- Parameters:
scoreDirector
- never null, theScoreDirector
which has theScoreDirector.getWorkingSolution()
to which the selection belongs or applies toselection
- never null, aPlanningEntity
, a planningValue, aMove
or aSelector
to create the probabilityWeight for- Returns:
0.0 <= returnValue <
Double.POSITIVE_INFINITY
-