Description Usage Arguments Value References
View source: R/dynamic_programming_knapsack.R
Knapsack problem solution using Dynamic Algorithm in R. It calculates best values and weights for given capacity.
1 | dynamic_knapsack(x, W)
|
x |
Dataframe with variables v and w. |
W |
Integer as capacity. |
Returns a list with best value and combination.
https://en.wikipedia.org/wiki/Knapsack_problem#0.2F1_knapsack_problem
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.