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 thePlanningSolutionannotationT- the selection type
- All Implemented Interfaces:
SelectionSorter<Solution_,T>
public class WeightFactorySelectionSorter<Solution_,T> extends Object implements SelectionSorter<Solution_,T>
Sorts a selectionListbased 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 voidsort(ScoreDirector<Solution_> scoreDirector, List<T> selectionList)voidsort(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:
sortin interfaceSelectionSorter<Solution_,T>- Parameters:
scoreDirector- never null, theScoreDirectorwhich has theScoreDirector.getWorkingSolution()to which the selections belong or apply toselectionList- never null, aListofPlanningEntity, planningValue,MoveorSelector
-
sort
public void sort(Solution_ solution, List<T> selectionList)
- Parameters:
solution- never null, thePlanningSolutionto which the selections belong or apply toselectionList- never null, aListofPlanningEntity, planningValue,MoveorSelector
-
-