greedy_knapsack: Implements Greedy approach for knapsack problem

Description Usage Arguments Details Value Source

View source: R/greedy_heuristic.r

Description

a greedy approximation algorithm which solves the unbounded knapsack problem

Usage

1

Arguments

x

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

W

Knapsack capacity

Details

This algorithm will not give an exact result,it will reduce the computational complexity considerably

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.