Package org.opt4j.benchmarks.knapsack
Class ItemSelection
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Item>,Collection<Item>,Set<Item>
The set of selected items.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTheItemSelectionis feasible if no knapsack is overloaded.voidsetFeasible(boolean feasible) Sets the feasibility of theItemSelection.Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, newHashSet, remove, size, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toStringMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
ItemSelection
public ItemSelection()
-
-
Method Details
-
isFeasible
TheItemSelectionis feasible if no knapsack is overloaded.- Returns:
- true if the selection is feasible
-
setFeasible
Sets the feasibility of theItemSelection.- Parameters:
feasible- true if the selection is feasible, false otherwise
-