Description Usage Arguments Value
View source: R/knapsack_brute_force.r
A Brute-Force Solution for the Knapsack Problem
1 | knapsack_brute_force(x, W, parallel = FALSE)
|
x |
a |
W |
the maximum weight that the knapsack can hold |
parallel |
TRUE if a parallelised version of the solution is to be called; FALSE by default |
a list
containing two elements: value
and elements
, representing the maximum value that can be realised with the given knapsack and the indices of the items to be packed in the knapsack for realising maximum value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.