brute_force_knapsack: knapsack problem by brute_force method

Description Arguments Value References Examples

View source: R/bruteForce.R

Description

knapsack problem by brute_force method

Arguments

x

A takes a data.frame cx with two variables v and w

W

The variable W is the knapsack size.

parallel

in brute force knapsack() that is FALSE by default (so it works with the test suite where we have not specifed the argument parallel). If set to TRUE, the function should parallelize over the detected cores. $elements which indicates which row objects in data.frame x was put in the knapsack.

Value

the maximum knapsack

References

http://en.wikipedia.org/wiki/Knapsack_problem

Examples

1
2
3
4
5
6

nourqweder/AdvRLab6 documentation built on Nov. 4, 2019, 10:09 p.m.