C++ Reference
C++ Reference: Algorithms
KnapsackPropagatorabstract
Detailed Description
Definition at line 443 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) |
Constructor & Destructor Documentation
◆ KnapsackPropagator()
|
explicit |
◆ ~KnapsackPropagator()
|
virtual |
Member Function Documentation
◆ ComputeProfitBounds()
|
pure virtual |
Implemented in KnapsackCapacityPropagator.
◆ CopyCurrentStateToSolution()
| void CopyCurrentStateToSolution | ( | bool | has_one_propagator, |
| std::vector< bool > * | solution | ||
| ) | const |
◆ CopyCurrentStateToSolutionPropagator()
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.
◆ current_profit()
|
inline |
Definition at line 462 of file knapsack_solver.h.
◆ GetNextItemId()
|
pure virtual |
Implemented in KnapsackCapacityPropagator.
◆ Init()
| void Init | ( | const std::vector< int64 > & | profits, |
| const std::vector< int64 > & | weights | ||
| ) |
◆ InitPropagator()
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.
◆ items()
|
inlineprotected |
Definition at line 494 of file knapsack_solver.h.
◆ profit_lower_bound()
|
inline |
Definition at line 463 of file knapsack_solver.h.
◆ profit_upper_bound()
|
inline |
Definition at line 464 of file knapsack_solver.h.
◆ set_profit_lower_bound()
|
inlineprotected |
Definition at line 496 of file knapsack_solver.h.
◆ set_profit_upper_bound()
|
inlineprotected |
Definition at line 497 of file knapsack_solver.h.
◆ state()
|
inlineprotected |
Definition at line 493 of file knapsack_solver.h.
◆ Update()
| bool Update | ( | bool | revert, |
| const KnapsackAssignment & | assignment | ||
| ) |
◆ UpdatePropagator()
|
protectedpure virtual |
Implemented in KnapsackCapacityPropagator.
The documentation for this class was generated from the following file: