pykp.item.Item#

class pykp.item.Item(value: int, weight: int)#

Bases: object

Represents an item for the knapsack problem.

value#

The value of the item.

Type:

int

weight#

The weight of the item.

Type:

int

__init__(value: int, weight: int) None#

Methods

__init__(value, weight)

Attributes