R/RcppExports.R

Defines functions bruteForce

Documented in bruteForce

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Solve the knapsack problem by brute force via C++ code
#'
#' @param v The values to be put in the knapsack
#' @param w The weights of the values 
#' @param W The capacity of the knapsack
#' @param n The number of elements to consider
#' 
#' @return A vector of length n with 1 if the element is included in the knapsack and 0 otherwise.
bruteForce <- function(v, w, W, n) {
    .Call(`_Lab6RT_bruteForce`, v, w, W, n)
}
Safvenberger/Lab6RT documentation built on Oct. 16, 2020, 1:56 a.m.