Knapsack¶
- class Knapsack(values, weights, max_weight)[ソース]¶
ベースクラス:
OptimizationApplication
Optimization application for the 「knapsack problem」 [1].
参照
[1]: 「Knapsack problem」, https://en.wikipedia.org/wiki/Knapsack_problem
- パラメータ:
Attributes
Getter of max_weight
Methods
interpret
(result)Interpret a result as item indices
Convert a knapsack problem instance into a
QuadraticProgram