Package org.opt4j.benchmarks.knapsack
Class KnapsackProblemFile
java.lang.Object
org.opt4j.benchmarks.knapsack.KnapsackProblemFile
- All Implemented Interfaces:
KnapsackProblem
The
KnapsackProblemFile
is a KnapsackProblem
that is
initialized by a file. The format can be found on the referenced website.- See Also:
-
Constructor Summary
ConstructorDescriptionKnapsackProblemFile
(String filename) Constructs aKnapsackProblemFile
with a given file name. -
Method Summary
-
Constructor Details
-
KnapsackProblemFile
Constructs aKnapsackProblemFile
with a given file name.- Parameters:
filename
- the file name
-
-
Method Details
-
getKnapsacks
Description copied from interface:KnapsackProblem
Returns the knapsacks.- Specified by:
getKnapsacks
in interfaceKnapsackProblem
- Returns:
- the knapsacks.
-
getItems
Description copied from interface:KnapsackProblem
Returns the items.- Specified by:
getItems
in interfaceKnapsackProblem
- Returns:
- the items
-