![]() |
OR-Tools
8.2
|
Definition at line 440 of file knapsack_solver.h.
Public Member Functions | |
KnapsackPropagator (const KnapsackState &state) | |
virtual | ~KnapsackPropagator () |
void | Init (const std::vector< int64 > &profits, const std::vector< int64 > &weights) |
bool | Update (bool revert, const KnapsackAssignment &assignment) |
virtual void | ComputeProfitBounds ()=0 |
virtual int | GetNextItemId () const =0 |
int64 | current_profit () const |
int64 | profit_lower_bound () const |
int64 | profit_upper_bound () const |
void | CopyCurrentStateToSolution (bool has_one_propagator, std::vector< bool > *solution) const |
Protected Member Functions | |
virtual void | InitPropagator ()=0 |
virtual bool | UpdatePropagator (bool revert, const KnapsackAssignment &assignment)=0 |
virtual void | CopyCurrentStateToSolutionPropagator (std::vector< bool > *solution) const =0 |
const KnapsackState & | state () const |
const std::vector< KnapsackItemPtr > & | items () const |
void | set_profit_lower_bound (int64 profit) |
void | set_profit_upper_bound (int64 profit) |
|
explicit |
Definition at line 162 of file knapsack_solver.cc.
|
virtual |
Definition at line 169 of file knapsack_solver.cc.
|
pure virtual |
Implemented in KnapsackCapacityPropagator.
void CopyCurrentStateToSolution | ( | bool | has_one_propagator, |
std::vector< bool > * | solution | ||
) | const |
Definition at line 196 of file knapsack_solver.cc.
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.
|
inline |
Definition at line 459 of file knapsack_solver.h.
|
pure virtual |
Implemented in KnapsackCapacityPropagator.
Definition at line 171 of file knapsack_solver.cc.
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.
|
inlineprotected |
Definition at line 491 of file knapsack_solver.h.
|
inline |
Definition at line 460 of file knapsack_solver.h.
|
inline |
Definition at line 461 of file knapsack_solver.h.
|
inlineprotected |
Definition at line 493 of file knapsack_solver.h.
|
inlineprotected |
Definition at line 494 of file knapsack_solver.h.
|
inlineprotected |
Definition at line 490 of file knapsack_solver.h.
bool Update | ( | bool | revert, |
const KnapsackAssignment & | assignment | ||
) |
Definition at line 184 of file knapsack_solver.cc.
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.