Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::KnapsackSearchNode Class Reference

#include <knapsack_solver.h>

Public Member Functions

 KnapsackSearchNode (const KnapsackSearchNode *parent, const KnapsackAssignment &assignment)
 --— KnapsackSearchNode --—
 
 KnapsackSearchNode (const KnapsackSearchNode &)=delete
 This type is neither copyable nor movable.
 
KnapsackSearchNodeoperator= (const KnapsackSearchNode &)=delete
 
int depth () const
 
const KnapsackSearchNodeparent () const
 
const KnapsackAssignmentassignment () const
 
int64_t current_profit () const
 
void set_current_profit (int64_t profit)
 
int64_t profit_upper_bound () const
 
void set_profit_upper_bound (int64_t profit)
 
int next_item_id () const
 
void set_next_item_id (int id)
 

Detailed Description

--— KnapsackSearchNode --— KnapsackSearchNode 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 KnapsackAssignment). 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 345 of file knapsack_solver.h.

Constructor & Destructor Documentation

◆ KnapsackSearchNode() [1/2]

operations_research::KnapsackSearchNode::KnapsackSearchNode ( const KnapsackSearchNode * parent,
const KnapsackAssignment & assignment )

--— KnapsackSearchNode --—

Definition at line 110 of file knapsack_solver.cc.

◆ KnapsackSearchNode() [2/2]

operations_research::KnapsackSearchNode::KnapsackSearchNode ( const KnapsackSearchNode & )
delete

This type is neither copyable nor movable.

Member Function Documentation

◆ assignment()

const KnapsackAssignment & operations_research::KnapsackSearchNode::assignment ( ) const
inline

Definition at line 358 of file knapsack_solver.h.

◆ current_profit()

int64_t operations_research::KnapsackSearchNode::current_profit ( ) const
inline

Definition at line 360 of file knapsack_solver.h.

◆ depth()

int operations_research::KnapsackSearchNode::depth ( ) const
inline

Definition at line 356 of file knapsack_solver.h.

◆ next_item_id()

int operations_research::KnapsackSearchNode::next_item_id ( ) const
inline

Definition at line 366 of file knapsack_solver.h.

◆ operator=()

KnapsackSearchNode & operations_research::KnapsackSearchNode::operator= ( const KnapsackSearchNode & )
delete

◆ parent()

const KnapsackSearchNode * operations_research::KnapsackSearchNode::parent ( ) const
inline

Definition at line 357 of file knapsack_solver.h.

◆ profit_upper_bound()

int64_t operations_research::KnapsackSearchNode::profit_upper_bound ( ) const
inline

Definition at line 363 of file knapsack_solver.h.

◆ set_current_profit()

void operations_research::KnapsackSearchNode::set_current_profit ( int64_t profit)
inline

Definition at line 361 of file knapsack_solver.h.

◆ set_next_item_id()

void operations_research::KnapsackSearchNode::set_next_item_id ( int id)
inline

Definition at line 367 of file knapsack_solver.h.

◆ set_profit_upper_bound()

void operations_research::KnapsackSearchNode::set_profit_upper_bound ( int64_t profit)
inline

Definition at line 364 of file knapsack_solver.h.


The documentation for this class was generated from the following files: