greedy_knapsack: Greedy knapsack

Description Usage Arguments Value References

Description

Calculates best values and weights for given capacity.

Usage

1

Arguments

x

Dataframe with variables v and w.

W

Integer as capacity.

Value

The Function Returns maximum knapsack value and corresponding elements that contributes to the value.

References

https://en.wikipedia.org/wiki/Knapsack_problem#Greedy_approximation_algorithm


ugurcanlacin/Lab6 documentation built on May 7, 2019, 3:57 a.m.