OR-Tools  9.3
KnapsackItem

Detailed Description

Definition at line 314 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()

KnapsackItem ( int  _id,
int64_t  _weight,
int64_t  _profit 
)
inline

Definition at line 315 of file knapsack_solver.h.

Member Function Documentation

◆ GetEfficiency()

double GetEfficiency ( int64_t  profit_max) const
inline

Definition at line 317 of file knapsack_solver.h.

Member Data Documentation

◆ id

const int id

Definition at line 325 of file knapsack_solver.h.

◆ profit

const int64_t profit

Definition at line 327 of file knapsack_solver.h.

◆ weight

const int64_t weight

Definition at line 326 of file knapsack_solver.h.


The documentation for this struct was generated from the following file: