Description Usage Arguments Value References Examples
View source: R/greedy_knapsack.R
Greedy Heuristic
1 | greedy_knapsack(x, W)
|
x |
|
W |
max weight of the knapsack |
a list with at least 50
https://en.wikipedia.org/wiki/Knapsack_problem#Greedy_approximation_algorithm
1 2 | data(knapsack_objects)
greedy_knapsack(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.