public interface SubsetProblem extends Problem<SubsetSolution>
SubsetSolution, extending the general Problem interface.
A subset problem contains specific methods to create empty subset solutions in which no IDs are selected, and indicates
the desired minimum and maximum subset size.| Modifier and Type | Method and Description |
|---|---|
SubsetSolution |
createEmptySubsetSolution()
Creates an empty subset solution in which no IDs are selected.
|
int |
getMaxSubsetSize()
The maximum size of the subset to be selected.
|
int |
getMinSubsetSize()
The minimum size of the subset to be selected.
|
boolean |
rejectSolution(SubsetSolution solution,
boolean checkSubsetSize)
Checks whether the given subset solution is to be rejected, possibly ignoring its current size.
|
createRandomSolution, evaluate, isMinimizing, rejectSolutionSubsetSolution createEmptySubsetSolution()
int getMinSubsetSize()
int getMaxSubsetSize()
boolean rejectSolution(SubsetSolution solution, boolean checkSubsetSize)
checkSubsetSize is false, the given solution is not rejected
if it has an invalid size but yet satisfies all other constraints.solution - subset solution to verifycheckSubsetSize - indicates whether a solution should be rejected if it has an invalid sizetrue if the solution is rejectedCopyright © 2014. All rights reserved.