greedy_knapsack: greedy_knapsack_c function

Description Usage Arguments Value

View source: R/greedy_knapsack.R

Description

greedy_knapsack_c function

Usage

1
greedy_knapsack(x, W, fast = FALSE)

Arguments

x

A data.frame with two variables v (values) and w (weights)

W

The maximum knapsack size

fast

=FALSE set to TRUE if you want c++ code

Value

A list of the maximum value in the knapsack and the elements choosen to be in the knapsack


ErikaAnderskar/KnapSack documentation built on May 20, 2019, 1:26 p.m.