brute_force_knapsack: brute_force_knapsack

Description Usage Arguments Value

View source: R/brute_force_knapsack.R

Description

An algorithm that tries every possible alternatives of items in the knapsack and returns the optimal solution.

Usage

1

Arguments

x

dataframe with columns w and v (weight and value) representing the items

W

double representing the weight limit of the knapsack

parallel

boolean whether the code should be run in parallel or not. Default is to FALSE.

Value

list with the value of the items in the knapsack and the elements contained in the knapsack.


Marbr987/lab6 documentation built on Dec. 17, 2021, 2:20 a.m.