C++ Reference: class BasicKnapsackSolver

Note: This documentation is automatically generated.

Use Dynamic programming to solve a single knapsack. This is used by the presolver to simplify variables appearing in a single linear constraint.

Complexity is the best of
   - O(num_variables * num_relevant_values ^ 2) or
   - O(num_variables * num_relevant_values * max_domain_size).
Method
Solve

Return type: Result

Arguments: const std::vector<Domain>& domains, const std::vector<int64_t>& coeffs, const std::vector<int64_t>& costs, const Domain& rhs