C++ Reference: class KnapsackSolver

Note: This documentation is automatically generated.

Method
BestSolutionContains

Return type: bool

Arguments: int item_id

GetName

Return type: std::string

Init

Return type: void

Arguments: const std::vector<int64_t>& profits, const std::vector<std::vector<int64_t> >& weights, const std::vector<int64_t>& capacities

IsSolutionOptimal

Return type: bool

KnapsackSolver

Return type: explicit

Arguments: const std::string& solver_name

KnapsackSolver

Arguments: SolverType solver_type, const std::string& solver_name

~KnapsackSolver

Return type: virtual

set_time_limit

Return type: void

Arguments: double time_limit_seconds

set_use_reduction

Return type: void

Arguments: bool use_reduction

Solve

Return type: int64_t

use_reduction

Return type: bool