KnapsackUtils class

Item with weight and value.

Constructors

KnapsackUtils(int weight, int value)
Creates a knapsack item with the given weight (cost) and value (profit).
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
Item value (profit).
no setter
weight int
Item weight (cost).
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited