Class WeightFactorySelectionSorter<Solution_,T>
- java.lang.Object
-
- org.optaplanner.core.impl.heuristic.selector.common.decorator.WeightFactorySelectionSorter<Solution_,T>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotationT
- the selection type
- All Implemented Interfaces:
SelectionSorter<Solution_,T>
public class WeightFactorySelectionSorter<Solution_,T> extends Object implements SelectionSorter<Solution_,T>
Sorts a selectionList
based on aSelectionSorterWeightFactory
.
-
-
Constructor Summary
Constructors Constructor Description WeightFactorySelectionSorter(SelectionSorterWeightFactory<Solution_,T> selectionSorterWeightFactory, SelectionSorterOrder selectionSorterOrder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
sort(ScoreDirector<Solution_> scoreDirector, List<T> selectionList)
void
sort(Solution_ solution, List<T> selectionList)
-
-
-
Constructor Detail
-
WeightFactorySelectionSorter
public WeightFactorySelectionSorter(SelectionSorterWeightFactory<Solution_,T> selectionSorterWeightFactory, SelectionSorterOrder selectionSorterOrder)
-
-
Method Detail
-
sort
public void sort(ScoreDirector<Solution_> scoreDirector, List<T> selectionList)
- Specified by:
sort
in interfaceSelectionSorter<Solution_,T>
- Parameters:
scoreDirector
- never null, theScoreDirector
which has theScoreDirector.getWorkingSolution()
to which the selections belong or apply toselectionList
- never null, aList
ofPlanningEntity
, planningValue,Move
orSelector
-
sort
public void sort(Solution_ solution, List<T> selectionList)
- Parameters:
solution
- never null, thePlanningSolution
to which the selections belong or apply toselectionList
- never null, aList
ofPlanningEntity
, planningValue,Move
orSelector
-
-