bruteForce: Solve the knapsack problem by brute force via C++ code

Description Usage Arguments Value

View source: R/RcppExports.R

Description

Solve the knapsack problem by brute force via C++ code

Usage

1
bruteForce(v, w, W, n)

Arguments

v

The values to be put in the knapsack

w

The weights of the values

W

The capacity of the knapsack

n

The number of elements to consider

Value

A vector of length n with 1 if the element is included in the knapsack and 0 otherwise.


Safvenberger/Lab6RT documentation built on Oct. 16, 2020, 1:56 a.m.