brute_force_knapsack: Brute force algorithm for the knapsack problem

Description Usage Arguments Details Value Source

View source: R/brute_force_knapsack.R

Description

takes a data.frame cx with two variables v and w and returns the maximum knapsack value and which elements (rows in the data.frame)

Usage

1

Arguments

x

data.frame,with a weight w and a value v

W

Knapsack capacity

Details

takes a data.frame cx with two variables v and w and returns the maximum knapsack value and which elements (rows in the data.frame)

Value

Maximum knapsack value and which elements (row in x)

Source

https://en.wikipedia.org/wiki/Knapsack_problem#Greedy_approximation_algorithm


OmidLavakhamseh/knapsackproj documentation built on Dec. 18, 2021, 5:35 a.m.