Description Usage Arguments Value
View source: R/brute_force_knapsack.R
This algorithm estimates how to put available items into the knapsack in order to get the maximum possible value less than weight of knapsack. Here brute force approach is implemented that means all possible combinations of items O(2^n) are considered.
1 | brute_force_knapsack(x, W, parallel = FALSE)
|
x |
Data frame with two numeric columns: weights and values |
W |
Total weight of the knapsack |
parallel |
logical parameter for parallel computation |
List with numbers of items that can be put into knapsack and maximum obtained value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.