Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class KnapsackSearchNodeForCuts
Note: This documentation is automatically generated.
----- KnapsackSearchNodeForCuts -----
KnapsackSearchNodeForCuts is a class used to describe a decision in the
decision search tree.
The node is defined by a pointer to the parent search node and an
assignment (see KnapsackAssignmentForCuts).
As the current state is not explicitly stored in a search node, one should
go through the search tree to incrementally build a partial solution from
a previous search node.
[[["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\u003e\u003ccode\u003eKnapsackSearchNodeForCuts\u003c/code\u003e objects represent decisions in a knapsack problem's decision search tree, defined by a parent node and an assignment.\u003c/p\u003e\n"],["\u003cp\u003eThe current state is not directly stored within the node; instead, it's incrementally built by traversing the search tree from a previous node.\u003c/p\u003e\n"],["\u003cp\u003eEach node stores information such as its depth in the tree, current profit, an upper bound on the profit, and the next item to consider.\u003c/p\u003e\n"],["\u003cp\u003eVarious methods allow access to and manipulation of the node's properties, including assignment, profit, depth, and the next item ID.\u003c/p\u003e\n"]]],["`KnapsackSearchNodeForCuts` represents a decision within a search tree, defined by a parent node and an assignment. Key actions include accessing the `assignment`, `current_profit`, `depth`, `next_item_id`, `parent`, and `profit_upper_bound`. You can also set the `current_profit`, `next_item_id`, and `profit_upper_bound`. Nodes are constructed with a parent node and assignment. Partial solutions are incrementally built by traversing the tree. Copying and assignment operations are disabled for this class.\n"],null,["# KnapsackSearchNodeForCuts\n\nC++ Reference: class KnapsackSearchNodeForCuts\n==============================================\n\n\nNote: This documentation is automatically generated.\n\n----- KnapsackSearchNodeForCuts ----- \nKnapsackSearchNodeForCuts is a class used to describe a decision in the decision search tree. The node is defined by a pointer to the parent search node and an assignment (see KnapsackAssignmentForCuts). As the current state is not explicitly stored in a search node, one should go through the search tree to incrementally build a partial solution from a previous search node.\n\n| Method ||\n|--------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`assignment`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L114) | Return type: `const KnapsackAssignmentForCuts& ` \u003cbr /\u003e |\n| [`current_profit`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L116) | Return type: `double ` \u003cbr /\u003e |\n| [`depth`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L112) | Return type: `int ` \u003cbr /\u003e |\n| [`KnapsackSearchNodeForCuts`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L105) | \u003cbr /\u003e Arguments: `const KnapsackSearchNodeForCuts* parent, const KnapsackAssignmentForCuts& assignment` \u003cbr /\u003e |\n| [`KnapsackSearchNodeForCuts`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L108) | \u003cbr /\u003e Arguments: `const KnapsackSearchNodeForCuts&) = delete; KnapsackSearchNodeForCuts& operator=(const KnapsackSearchNodeForCuts&) = delete; int depth(` \u003cbr /\u003e |\n| [`next_item_id`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L122) | Return type: `int ` \u003cbr /\u003e |\n| [`parent`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L113) | Return type: `const KnapsackSearchNodeForCuts* const ` \u003cbr /\u003e |\n| [`profit_upper_bound`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L119) | Return type: `double ` \u003cbr /\u003e |\n| [`set_current_profit`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L117) | Return type: `void ` Arguments: `double profit` \u003cbr /\u003e |\n| [`set_next_item_id`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L123) | Return type: `void ` Arguments: `int id` \u003cbr /\u003e |\n| [`set_profit_upper_bound`](https://github.com/google/or-tools/blob/v9.4/ortools/algorithms/knapsack_solver_for_cuts.h#L120) | Return type: `void ` Arguments: `double profit` \u003cbr /\u003e |"]]