Description Usage Arguments Details Value Source
View source: R/greedy_heuristic.r
a greedy approximation algorithm which solves the unbounded knapsack problem
1 | greedy_knapsack(x, W)
|
x |
data.frame,with a weight w and a value v |
W |
Knapsack capacity |
This algorithm will not give an exact result,it will reduce the computational complexity considerably
Maximum knapsack value and which elements (row in x)
https://en.wikipedia.org/wiki/Knapsack_problem#Greedy_approximation_algorithm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.