Description Usage Arguments Value References Examples
View source: R/knapsack_dynamic.R
Dynamic Programming
1 | knapsack_dynamic(x, W)
|
x |
x |
W |
max weight (discrete) of the knapsack |
a list with max value and corresponding elements
https://en.wikipedia.org/wiki/Knapsack_problem#Dynamic_programming_in-advance_algorithm
1 2 | data(knapsack_objects)
knapsack_dynamic(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.