brute_force_knapsack: Brute Force Knapsack

Description Usage Arguments Value References

View source: R/brute_force_knapsack.R

Description

Returns the maximum value given the capacity of knapsack by looking through every possible alternatives.

Usage

1

Arguments

x

A data.frame consisting of two variables. w represents the object's weight and v is the value.

W

the maximum capacity of the knapsack.

parallel

FALSE by default. If TRUE, the function is parallelized over detected cores.

Value

A list containing the maximum value and the elements.

References

en.wikipedia.org/wiki/Knapsack_problem


Jorisvdoorn/lab6group8 documentation built on Oct. 30, 2019, 8:02 p.m.