Updates the state by applying or reverting a decision.
Returns false if fails, i.e. trying to apply an inconsistent decision
to an already assigned item.
[[["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."],[[["`KnapsackState` is a C++ class representing a partial solution to the knapsack problem."],["It provides methods to initialize, update, and query the state of items in the knapsack."],["`KnapsackState` tracks which items are included in the solution and which are still unbound."],["The `UpdateState` method allows applying or reverting decisions, ensuring consistency."]]],["`KnapsackState` represents a partial solution to the knapsack problem. Key actions include: `Init` initializes item vectors as unbound. `GetNumberOfItems` retrieves the item count. `is_bound` and `is_in` check item status. `UpdateState` applies or reverts decisions via a `KnapsackAssignment`, returning `false` if a decision is inconsistent with existing assignments. There's also a constructor `KnapsackState` available.\n"]]