C++ Reference: class BaseKnapsackSolver
Note: This documentation is automatically generated.
----- BaseKnapsackSolver -----
This is the base class for knapsack solvers.
Method | |
---|---|
BaseKnapsackSolver | Return type: Arguments: |
~BaseKnapsackSolver | Return type: |
best_solution | Return type: Arguments: Returns true if the item 'item_id' is packed in the optimal knapsack. |
GetLowerAndUpperBoundWhenItem | Return type: Arguments: Gets the lower and upper bound when the item is in or out of the knapsack. To ensure objects are correctly initialized, this method should not be called before ::Init. |
GetName | Return type: |
Init | Return type: Arguments: Initializes the solver and enters the problem to be solved. |
Solve | Return type: Arguments: Solves the problem and returns the profit of the optimal solution. |