[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eBasicKnapsackSolver\u003c/code\u003e utilizes dynamic programming to address the single knapsack problem, simplifying variables within a single linear constraint during presolving.\u003c/p\u003e\n"],["\u003cp\u003eThe solver boasts a complexity that is determined by the most efficient option between O(num_variables * num_relevant_values ^ 2) and O(num_variables * num_relevant_values * max_domain_size).\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eSolve\u003c/code\u003e method is provided, accepting domains, coefficients, costs, and a right-hand side to compute a solution.\u003c/p\u003e\n"]]],["The `BasicKnapsackSolver` class utilizes dynamic programming to solve a single knapsack problem. It simplifies variables in single linear constraints, with a time complexity of either O(num_variables * num_relevant_values ^ 2) or O(num_variables * num_relevant_values * max_domain_size). The primary action is performed by the `Solve` method, which accepts vectors of domains, coefficients, costs, and a right-hand side domain (`rhs`) as input and returns a `Result`.\n"],null,["# BasicKnapsackSolver\n\nC++ Reference: class BasicKnapsackSolver\n========================================\n\n\nNote: This documentation is automatically generated.\nUse Dynamic programming to solve a single knapsack. This is used by the presolver to simplify variables appearing in a single linear constraint. \n\nComplexity is the best of \n- O(num_variables \\* num_relevant_values \\^ 2) or \n- O(num_variables \\* num_relevant_values \\* max_domain_size).\n\n| Method ||\n|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`Solve`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/util.h#L244) | Return type: `Result ` Arguments: `const std::vector\u003cDomain\u003e& domains, const std::vector\u003cint64_t\u003e& coeffs, const std::vector\u003cint64_t\u003e& costs, const Domain& rhs` \u003cbr /\u003e |"]]