Description Usage Arguments Value Examples
View source: R/optimized_dynamic_programming.R
Optimized version of the dynamic programming algorithm.
1 |
x |
Dataframe containing weight and value of objects |
W |
maximum weight allowed in knapsack |
List with the optimal value and the respective elements, that are included in the solution.
1 2 3 | knapsack_objects <- get_knapsack_objects(2000)
optimized_dynamic_programming(x = knapsack_objects[1:8, ], W = 3500)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.