C++ Reference
C++ Reference: Algorithms
KnapsackItem
Detailed Description
Definition at line 312 of file knapsack_solver.h.
Public Member Functions | |
| KnapsackItem (int _id, int64_t _weight, int64_t _profit) | |
| double | GetEfficiency (int64_t profit_max) const |
Public Attributes | |
| const int | id |
| const int64_t | weight |
| const int64_t | profit |
Constructor & Destructor Documentation
◆ KnapsackItem()
|
inline |
Definition at line 313 of file knapsack_solver.h.
Member Function Documentation
◆ GetEfficiency()
|
inline |
Definition at line 315 of file knapsack_solver.h.
Member Data Documentation
◆ id
| const int id |
Definition at line 323 of file knapsack_solver.h.
◆ profit
| const int64_t profit |
Definition at line 325 of file knapsack_solver.h.
◆ weight
| const int64_t weight |
Definition at line 324 of file knapsack_solver.h.
The documentation for this struct was generated from the following file: