![]() |
OR-Tools
9.6
|
Definition at line 446 of file knapsack_solver.h.
Public Member Functions | |
| KnapsackPropagator (const KnapsackState &state) | |
| virtual | ~KnapsackPropagator () |
| void | Init (const std::vector< int64_t > &profits, const std::vector< int64_t > &weights) |
| bool | Update (bool revert, const KnapsackAssignment &assignment) |
| virtual void | ComputeProfitBounds ()=0 |
| virtual int | GetNextItemId () const =0 |
| int64_t | current_profit () const |
| int64_t | profit_lower_bound () const |
| int64_t | 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_t profit) |
| void | set_profit_upper_bound (int64_t profit) |
|
explicit |
Definition at line 164 of file knapsack_solver.cc.
|
virtual |
Definition at line 171 of file knapsack_solver.cc.
|
pure virtual |
Implemented in KnapsackCapacityPropagator.
| void CopyCurrentStateToSolution | ( | bool | has_one_propagator, |
| std::vector< bool > * | solution | ||
| ) | const |
Definition at line 198 of file knapsack_solver.cc.
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.
|
inline |
Definition at line 465 of file knapsack_solver.h.
|
pure virtual |
Implemented in KnapsackCapacityPropagator.
| void Init | ( | const std::vector< int64_t > & | profits, |
| const std::vector< int64_t > & | weights | ||
| ) |
Definition at line 173 of file knapsack_solver.cc.
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.
|
inlineprotected |
Definition at line 497 of file knapsack_solver.h.
|
inline |
Definition at line 466 of file knapsack_solver.h.
|
inline |
Definition at line 467 of file knapsack_solver.h.
|
inlineprotected |
Definition at line 499 of file knapsack_solver.h.
|
inlineprotected |
Definition at line 500 of file knapsack_solver.h.
|
inlineprotected |
Definition at line 496 of file knapsack_solver.h.
| bool Update | ( | bool | revert, |
| const KnapsackAssignment & | assignment | ||
| ) |
Definition at line 186 of file knapsack_solver.cc.
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.