toysolver-0.7.0: Assorted decision procedures for SAT, SMT, Max-SAT, PB, MIP, etc
Copyright(c) Masahiro Sakai 2015
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010
Extensions
  • ScopedTypeVariables
  • BangPatterns
  • ExplicitForAll

ToySolver.Combinatorial.Knapsack.DPSparse

Description

Simple 0-1 knapsack problem solver that uses DP.

Documentation

solve :: forall value weight. (Real value, Real weight) => [(value, weight)] -> weight -> (value, weight, [Bool]) Source #

solveInt :: forall value. Real value => [(value, Int)] -> Int -> (value, Int, [Bool]) Source #

solveInteger :: forall value. Real value => [(value, Integer)] -> Integer -> (value, Integer, [Bool]) Source #

solveGeneric :: forall value weight. (Real value, Real weight) => [(value, weight)] -> weight -> (value, weight, [Bool]) Source #