applications
Class RecursiveDPKnapsack

java.lang.Object
  |
  +--applications.RecursiveDPKnapsack

public class RecursiveDPKnapsack
extends java.lang.Object


Constructor Summary
RecursiveDPKnapsack()
           
 
Method Summary
static int knapsack(int[] theProfit, int[] theWeight, int knapsackCapacity)
          set class data members and invoke method f
static void main(java.lang.String[] args)
          test program
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveDPKnapsack

public RecursiveDPKnapsack()
Method Detail

knapsack

public static int knapsack(int[] theProfit,
                           int[] theWeight,
                           int knapsackCapacity)
set class data members and invoke method f
Parameters:
theProfit[1:theProfit.length - - 1] gives object profits
theWeight[1:theWeight.length-1] - gives object weights
Returns:
value of optimal knapsack filling

main

public static void main(java.lang.String[] args)
test program