brute_force_knapsack: An implementation of the brute force solution to the knapsack...

Description Usage Arguments

View source: R/brute_force_knapsack.R

Description

An implementation of the brute force solution to the knapsack problem Where we list all possible combinations of a vector with size {0,1}\*n and then make it into a matrix and check each row for best possible value. The matrix has the size 2^n rows and n columns.

Usage

1

Arguments

x

data.frame with two vectors of the same size, v with values and w with weights

W

an integer as the total weight of the knapsack

parallel

boolean deciding if computation should be done in parallel or concurrent


SimonJonsson/lab6 documentation built on May 7, 2019, 2:53 a.m.