Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set | ||
|
||
// doxy/ or-tools/ src/ algorithms/ |
#include <knapsack_solver.h>
Public Member Functions | |
KnapsackSearchNode (const KnapsackSearchNode *const parent, const KnapsackAssignment &assignment) | |
local namespace | |
int | depth () const |
const KnapsackSearchNode *const | parent () const |
const KnapsackAssignment & | assignment () const |
int64 | current_profit () const |
void | set_current_profit (int64 profit) |
int64 | profit_upper_bound () const |
void | set_profit_upper_bound (int64 profit) |
int | next_item_id () const |
void | set_next_item_id (int id) |
The node is defined by a pointer to the parent search node and an assignment (see KnapsackAssignement). 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.
Definition at line 240 of file knapsack_solver.h.
operations_research::KnapsackSearchNode::KnapsackSearchNode | ( | const KnapsackSearchNode *const | parent, | |
const KnapsackAssignment & | assignment | |||
) |
int operations_research::KnapsackSearchNode::depth | ( | ) | const [inline] |
Definition at line 244 of file knapsack_solver.h.
const KnapsackSearchNode* const operations_research::KnapsackSearchNode::parent | ( | ) | const [inline] |
Definition at line 245 of file knapsack_solver.h.
const KnapsackAssignment& operations_research::KnapsackSearchNode::assignment | ( | ) | const [inline] |
Definition at line 246 of file knapsack_solver.h.
int64 operations_research::KnapsackSearchNode::current_profit | ( | ) | const [inline] |
Definition at line 248 of file knapsack_solver.h.
void operations_research::KnapsackSearchNode::set_current_profit | ( | int64 | profit | ) | [inline] |
Definition at line 249 of file knapsack_solver.h.
int64 operations_research::KnapsackSearchNode::profit_upper_bound | ( | ) | const [inline] |
Definition at line 251 of file knapsack_solver.h.
void operations_research::KnapsackSearchNode::set_profit_upper_bound | ( | int64 | profit | ) | [inline] |
Definition at line 252 of file knapsack_solver.h.
int operations_research::KnapsackSearchNode::next_item_id | ( | ) | const [inline] |
Definition at line 254 of file knapsack_solver.h.
void operations_research::KnapsackSearchNode::set_next_item_id | ( | int | id | ) | [inline] |
Definition at line 255 of file knapsack_solver.h.